User tests: Successful: Unsuccessful:
Pull Request for Issues #20958, #20485.
Removed the line that was setting the lookup for the view without layout because it was overwriting the Itemid
of the menu item that doesn't have a layout with the Itemid
of the menu item that has a layout.
The router works for views with layouts.
Note: Talked with @Hackwar, @bembelimen about these changes.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
That line is there for a purpose, to remove it is not that simple, it will effect many views and components
In J3 there are 2 places to remove it , but it is problematic
#19516
Please see description in a more complex PR here:
#19945
for a more complete solution , which might be good to be done for J4
I disagree with @ggppdk here. I have to admit that I did not test this intensively, but I went through the code with @alexandraciobica and that one line is wrong there. We are building a lookup with the view and the layout as key. That additional line creates a "fallback" for links where the layout might not match, but the view does. That is usefull for situations where variable content might be displayed differently, like with the category view, but it is pretty much useless for cases like the profile view in com_users. So we want to have the fallback in 246 for the variable content, but not here in line 259 for the fixed views, because with that "fallback", we would overwrite the original view with the more specific layout. That would specifically mean that the menu item for editing a profile would overwrite the menu item for viewing a profile if the later was processed before the former. Or a "thank you" menu item of a contact form would overwrite the original menu item for the contact form.
Long story short: It seems as if we really just need to remove that one line to fix this issue.
I have tested this item
Before patch:
index.php?option=com_users&view=profile =>
/joomla4/index.php/edit-profile
index.php?option=com_users&view=profile&layout=edit =>
/joomla4/index.php/edit-profile
After patch:
index.php?option=com_users&view=profile =>
/joomla4/index.php/profile
index.php?option=com_users&view=profile&layout=edit =>
/joomla4/index.php/edit-profile
In Joomla3 it works with and without this patch. It just appends '&layout=edit' to the profile-url. That's not right, but it works.
Whatever you think, please test on a multilingual site...
I have tested this item
Ok ok... on a multilanguage site the patch has no effect.
Coming from profile menu item you go back to profile by clicking 'Cancel' in the editing form.
Edit-profile as menu item stays on the form after clicking 'Cancel'.
Always:
index.php?option=com_users&view=profile =>
/joomla4ml/index.php/en/profile
index.php?option=com_users&view=profile&layout=edit =>
/joomla4ml/index.php/en/profile?layout=edit
I have tested this item
I have tested this item
Worked also on an multilingual site
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-10-02 07:11:36 |
Closed_By | ⇒ | laoneo | |
Labels |
Added:
?
|
Thanks for the pr.
Can this be done against 3.x? Or is this not B/C safe?