? ? Pending

User tests: Successful: Unsuccessful:

avatar alexandraciobica
alexandraciobica
19 Jul 2018

Pull Request for Issues #20958, #20485.

Summary of Changes

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.

Result

The router works for views with layouts.

Testing Instructions

  1. Create a menu item for the "User profile", another one for "Edit user profile"
  2. Go to "Edit user profile", click cancel.
    Result: Redirect to the "User profile" page

Note: Talked with @Hackwar, @bembelimen about these changes.

avatar alexandraciobica alexandraciobica - open - 19 Jul 2018
avatar alexandraciobica alexandraciobica - change - 19 Jul 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jul 2018
Category Libraries
avatar SharkyKZ
SharkyKZ - comment - 20 Jul 2018

Can this be done against 3.x? Or is this not B/C safe?

avatar alexandraciobica
alexandraciobica - comment - 20 Jul 2018

@SharkyKZ I tested it and it doesn't work for 3.x.

avatar alexandraciobica alexandraciobica - change - 20 Jul 2018
Labels Added: ?
avatar ggppdk
ggppdk - comment - 20 Jul 2018

@SharkyKZ
@alexandraciobica

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

avatar Hackwar
Hackwar - comment - 24 Jul 2018

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.

avatar ggppdk
ggppdk - comment - 24 Jul 2018

@Hackwar

so i understand that the points mentioned in J3 PRs are no longer valid in J4
please post a successful test since you tested it
i admit i have not tested this PR

avatar FPerisa
FPerisa - comment - 28 Aug 2018

I have tested this item successfully on 4535641

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.


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

avatar FPerisa FPerisa - test_item - 28 Aug 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 28 Aug 2018

Whatever you think, please test on a multilingual site...

avatar FPerisa
FPerisa - comment - 28 Aug 2018

I have tested this item ? unsuccessfully on 4535641

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


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

avatar FPerisa FPerisa - test_item - 28 Aug 2018 - Tested unsuccessfully
avatar ceus1984
ceus1984 - comment - 8 Sep 2018

I have tested this item successfully on 4535641


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

avatar ceus1984 ceus1984 - test_item - 8 Sep 2018 - Tested successfully
avatar spannama
spannama - comment - 8 Sep 2018

@ceus1984
Can you describe, where the cancel button is located? I've only found a close button.

avatar webnet-assmann
webnet-assmann - comment - 8 Sep 2018

I have tested this item successfully on 4535641

Worked also on an multilingual site


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

avatar webnet-assmann webnet-assmann - test_item - 8 Sep 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Sep 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Sep 2018

Ready to Commit after two successful tests.

avatar laoneo laoneo - change - 2 Oct 2018
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: ?
avatar laoneo laoneo - close - 2 Oct 2018
avatar laoneo laoneo - merge - 2 Oct 2018
avatar laoneo
laoneo - comment - 2 Oct 2018

Thanks for the pr.

Add a Comment

Login with GitHub to post a comment