User tests: Successful: Unsuccessful:
Pull Request for Issue #45238 .
Add Itemid in action of edit article form.
See original issue.
Save
and Save As Copy
would redirect to home page.
Save
and Save As Copy
would redirect to edit page.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_content |
I also tried that in the other branch. But I'm not sure which one is better.
Labels |
Added:
bug
PR-5.3-dev
|
Problem apparently not solved with the update, the behavior of the different actions (save, save and close...) remain unchanged.
I downloaded file Joomla_5.3.0-beta4-dev+pr.45254-Development-Update_Package.zip
And applied the update to the same Joomla minimal test site.
The Joomla version indicates 5.3.0-beta4-dev+pr.45254
I do notice that as a result of the update an override has been changed on Cassiopeia Details and Files but I had not created any overrides and I do not suspect that this is a problem (file /templates/cassiopeia/html/com_content/form/edit.php).
Tested on Edge and Chrome, cleared cache etc.
Sorry, I found that I didn't consider some of situation. But I don't have time for this until next week.
No files to download yet...
I tested Joomla_5.3.1-dev+pr.45254 in a minimal test environment and the results are still incorrect and very confusing. This (normal) method continues to cause problems.
However, these confusing redirects can now be avoided by providing a (hidden) Create Article menu item but not using this menu item. See the results below.
Also, the submission/cancel redirects of menu-item Create Article are not respected. This is actually very good if the standard New Article button on the blog and list view pages is used, as in my test and as probably is most used.
But if the Create Article menu-item is used, it would be better if those redirects work correctly, without affecting the redirects of the standard New Article button.
Thanks for the great work, how will this be continued?
Excuse my ignorance, but what are the next steps?
I have tested this item ✅ successfully on fbb04e3
I tested this on Firefox, Chrome and Edge and it worked.
@dpollez Are you requesting for further changes? Otherwise, please submit your test result here: https://issues.joomla.org/tracker/joomla-cms/45254
The Joomla_5.3.1-dev+pr.45254 change allows you to set up a coherent front-end modification. However, you must provide a hidden “create-article” menu item for this and not use this menu item itself. This actually gets around the original problem #45238. See tests 2 and 3 below (same tests as #45254).
But that original problem #45238 is still there, see test 1 below.
When modifying an article, you expect to stay in the same menu item after each action, even if no hidden “create-article” menu item is provided. However, this is only true after the “Save & Close” and “Cancel” actions. However, after “Save”, “Save as copy” or “Restore Version” you end up on the Home page and thus in an often totally different environment. This is very confusing and rectifying this seems useful.
A final redirect problem occurs when using the “create-article” menu item. The “submit” and “cancel” redirects of this menu item are not respected, see test 4. This would be better, of course, without changing the redirects of the default “New Article” button on blog and list view pages.
In short, what can be improved:
Make redirects at Edit also work correctly without a hidden “create-article” menu item.
Respect the “submit” and “cancel” redirects of a “create-article” menu item without impacting the redirects of the default “New Article” button on blog and list view pages.
Silent here, I hope this will be followed up?
@dpollez Was your 2nd last comment just a wish for improvement? Or was it a negative test result? If the latter, then maybe you should go to the issue tracker here https://issues.joomla.org/tracker/joomla-cms/45254 and use the blue "Test this" button and submit an unsuccessful test.
I have tested this item 🔴 unsuccessfully on fbb04e3
See my response on 25/4/2025
Labels |
Added:
Updates Requested
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2025-05-20 07:09:18 |
Closed_By | ⇒ | AkameOuO |
I closed this accidentally.
Multiple menu items can point to the same page.
It is hard to know the previous page in ArticleController::save
without passing the correct 'Itemid' with the form.
So I add a new parameter 'return_itemid' to handle this.
When the task is 'save2copy' or 'apply', and 'return_itemid' exists, it will be used as the 'Itemid' for redirect.
PS current patch is no longer use 'Create Artcle' menu item.
Status | Closed | ⇒ | New |
Closed_Date | 2025-05-20 07:09:18 | ⇒ | |
Closed_By | AkameOuO | ⇒ |
Status | New | ⇒ | Pending |
I have tested this item 🔴 unsuccessfully on 9879534
I tested version Joomla_5.3.1-rc2-dev+pr.45254 in a minimal test environment and the results are worse than version Joomla_5.3.1-dev+pr.45254, partly to be expected given the comment "PS current patch is no longer use ‘Create Artcle’ menu item."
The “submit” and “cancel” redirects of a “create-article” menu item are also still not respected.
See results below.
I am unable to replicate latest test result by #45254 (comment) .
And I cannot make the return parameter save both 'url before edit' and 'url of edit'. Unless I change it by javascript when submit the form.
I have tested this item 🔴 unsuccessfully on 9879534
I did a completely new test departing from a new Joomla 5.3.0 installation and the results are much better but with still some consistent errors: everywhere at Restore version and many errors at Create Article from a menu-item.
If those errors can be fixed, this is a perfect solution!
The reason for the difference with the previous test was that there I had 5.3.1-rc2-dev+pr.45254 installed on top of 5.3.1-dev+pr.45254. I didn't think this would cause problems, sorry about that
Will there be a sequel to this and what else can I possibly do?
Shouldn't this be in the ssave function of the article controller?
joomla-cms/components/com_content/src/Controller/ArticleController.php
Line 341 in f60f51c