User tests: Successful: Unsuccessful:
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.
Modify administrative com_content.ini file to signal user of new behaviour.
Modify components/com_content/controllers/article.php to enable redirect on cancel.
Create menuitem of type Submit new article.
You would like to specify a redirect page after article submission cancel as you do in case of save/submit success.
You cannot.
User indicated Redirection page will apply in case of Cancel too.
Category | ⇒ | Administration Language & Strings Front End com_content |
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
Category | Administration Language & Strings Front End com_content | ⇒ | com_tags Administration Language & Strings Front End com_content |
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 ]
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
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.
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
Category | Administration Language & Strings Front End com_content com_tags | ⇒ | Administration Language & Strings Front End com_content |
I have tested this item
Easy | No | ⇒ | Yes |
+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).
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?]
@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
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]
Please, check my English in language .ini file...
I have tested this item
Test before applying patch:
After applying patch:
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
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:
?
|
I am wondering why we even have a redirect at all