? ? ? Pending

User tests: Successful: Unsuccessful:

avatar LivioCavallo
LivioCavallo
11 Aug 2017

It would be useful to redirect to a user specified page after 'Cancel' of a new article submission.
At the moment it is not possible, we are redirected to the home page.

Summary of Changes

Modify administrative com_content.ini file to signal user of new behaviour.
Modify components/com_content/controllers/article.php to enable redirect on cancel.

Testing Instructions

Create menuitem of type Submit new article.

Expected result

You would like to specify a redirect page after article submission cancel as you do in case of save/submit success.

Actual result

You cannot.

Documentation Changes Required

User indicated Redirection page will apply in case of Cancel too.

avatar joomla-cms-bot joomla-cms-bot - change - 11 Aug 2017
Category Administration Language & Strings Front End com_content
avatar LivioCavallo LivioCavallo - open - 11 Aug 2017
avatar LivioCavallo LivioCavallo - change - 11 Aug 2017
Status New Pending
avatar LivioCavallo LivioCavallo - change - 11 Aug 2017
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - change - 14 Aug 2017
Category Administration Language & Strings Front End com_content com_tags Administration Language & Strings Front End com_content
avatar brianteeman
brianteeman - comment - 16 Aug 2017

I am wondering why we even have a redirect at all

avatar LivioCavallo
LivioCavallo - comment - 16 Aug 2017

Well, at the moment the behaviour is to go to the home page after cancel (1).
I think that letting the user to choose where to go (2) would be a big improvement.
Better options to achieve that than a redirect?

[Another usefull option would be (3) remembering the page where you were before opening the article submission page, and returning there after submission, cancel, ... Adding this option would require other work; maybe a future PR ]

avatar brianteeman
brianteeman - comment - 16 Aug 2017

I agree that redirecting to the home page seems wrong. Personally if i am on a page with a form and i pressed cancel i would expect to be back at the empty form - my 2c

avatar LivioCavallo
LivioCavallo - comment - 16 Aug 2017

That seems a reasonable option too.
It could be easy obtained if we could have two different redirection targets: one for successful article submission, one for cancel. In case of cancel user could simply set to redirect to the same page.

It's easy to modify code to have two distinct redirection targets.
Do you think it could be useful? I could submit such a PR.

avatar brianteeman
brianteeman - comment - 16 Aug 2017

Personally I wouldnt have any option (we have too many) and I would just change the default behaviour to return to the form instead of the homepage on cancel - my 2c

avatar joomla-cms-bot joomla-cms-bot - change - 17 Aug 2017
Category Administration Language & Strings Front End com_content com_tags Administration Language & Strings Front End com_content
avatar franz-wohlkoenig franz-wohlkoenig - test_item - 17 Aug 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Aug 2017

I have tested this item successfully on 84231f9


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17495.

avatar franz-wohlkoenig franz-wohlkoenig - change - 17 Aug 2017
Easy No Yes
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Aug 2017

+1 for PR. @brianteeman my Opinion is we have to low Options but to much Options unordered (Example "Options" of Articles are one long single Column).

avatar LivioCavallo
LivioCavallo - comment - 17 Aug 2017

I integrated some changes to include the behaviour suggested by @brianteeman as default option.
The additional option to set the cancel redirect page is shown just when requested by user (using showon in xml), so mantaining interface as clean as possible.

[testing this PR, I detected a redirection malfunction in this class, save function. I'll get a PR ready. Should I wait tu submit the PR till this is merged or closed, o I'd better submitting the new PR right now?]

avatar zero-24
zero-24 - comment - 17 Aug 2017

@LivioCavallo with the last two commits drone should be happy now ?

[testing this PR, I detected a redirection malfunction in this class, save function. I'll get a PR ready. Should I wait tu submit the PR till this is merged or closed, o I'd better submitting the new PR right now?]

As this is a different method and has nothing to do with this PR i would suggest to do a new PR just containing the change you suggest. Together with a description what you are trying to fix and how to reproduce that ?

avatar LivioCavallo
LivioCavallo - comment - 18 Aug 2017

More infos: the proposed solution integrates a workaround to erroneous route building. The problem is explained here #17599 and here #16774.
In details, at rows 185 and 190 I use the item's link property in addition to Itemid to build redir link and then send it to JRoute, something like: $redirlink = $item->link . $lang . '&Itemid=' . $cancelMenuitemId; passed to JRoute.
If you use just the Itemid the problems described in the above mentioned Issues arise.

Are the above mentioned issues solved in J!3.8 ? Will this code be a clean solution also in J!3.8?

[I won't make a PR to fix 'save' function as it now seems related to #17599 and #16774; solving that will solve save function problems too]

avatar LivioCavallo
LivioCavallo - comment - 18 Aug 2017

Please, check my English in language .ini file...

avatar Kev1n337 Kev1n337 - test_item - 21 Aug 2017 - Tested successfully
avatar Kev1n337
Kev1n337 - comment - 21 Aug 2017

I have tested this item successfully on 0f282d5

Test before applying patch:

  • Added menu item "create article"
  • No submission page: -> redirect to home page
  • Specified submission redirected: -> redirected on save, but not on cancel

After applying patch:

@icampus

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 21 Aug 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Aug 2017

I have tested this item successfully on 0f282d5


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17495.

avatar franz-wohlkoenig franz-wohlkoenig - change - 21 Aug 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Aug 2017

RTC after two successful tests.

avatar mbabker mbabker - change - 21 Aug 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-08-21 23:46:13
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 21 Aug 2017
avatar mbabker mbabker - merge - 21 Aug 2017

Add a Comment

Login with GitHub to post a comment