? Success
Pull Request for # 6461

User tests: Successful: Unsuccessful:

avatar Achal-Aggarwal
Achal-Aggarwal
25 Jul 2015

…opdown while editing module on frontend.

http://issues.joomla.org/tracker/joomla-cms/6461

Test instructions

Added by @brianteeman 25 Aug

Edit the index.php of the protostar template and rename the module position in line 177 from
<jdoc:include type="modules" name="position-8" style="xhtml" />

to

<jdoc:include type="modules" name="test123" style="xhtml" />

Now go to the module and create a new custom module and place it in position test123 (it wont be on the list you have to manually enter it)

Go to global configuration and make sure that you have "Mouse-over Edit Icons for" set for modules

Go to the front end of the site and check the new module is displayed and then log in

Hover over the module and you get an icon to let you open the module for editing. Change the module title and press save. The module will have been saved in a different position.

Now apply the patch. Go to module manager and put the module back into test123 and repeat

You will now see that when you edit the module you will see at the bottom of the list of module positions a section "Active positions" and test123 is there. Dont change the position. Edit the title and sabe the module. The module will have been saved in the same position

avatar Achal-Aggarwal Achal-Aggarwal - open - 25 Jul 2015
avatar Achal-Aggarwal Achal-Aggarwal - change - 25 Jul 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jul 2015
Labels Added: ?
avatar brianteeman brianteeman - change - 25 Jul 2015
Rel_Number 0 6461
Relation Type Pull Request for
avatar brianteeman brianteeman - change - 25 Jul 2015
Category Front End
avatar brianteeman
brianteeman - comment - 4 Aug 2015

While this edit does mean that the custom position IS displayed when you edit a module in a custom position the custom position is still NOT displayed when editing another module. This means that while you can move a module from a custom position to a position defined in the templatedetails.xml you cannot do the reverse.


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

avatar brianteeman brianteeman - test_item - 4 Aug 2015 - Tested unsuccessfully
avatar Achal-Aggarwal
Achal-Aggarwal - comment - 5 Aug 2015

Yes that is correct.

I don't think on frontend module position dropdown should have all custom positions. I don't know whether this is the requirement or not. I remember you saying that module position should behave on frontend as it does on backend. I don't agree with this.

This edit will allow users to edit module (positioned on custom position) on frontend. Currently they can't do it without changing its position to a position defined in the templatedetails.xml

avatar brianteeman
brianteeman - comment - 5 Aug 2015

Hard to explain to a user that they can move a module from one position to
another but not to all module positions

avatar sovainfo
sovainfo - comment - 6 Aug 2015

See no reason for the frontend to work differently from the backend, what is the justification for that?

avatar Bakual
Bakual - comment - 6 Aug 2015

It should behave the same, yes. If it's possible of course.
I don't see a reason why it should not.

avatar Achal-Aggarwal
Achal-Aggarwal - comment - 6 Aug 2015

@sovainfo
Assuming user doesn't have permission or can't change frontend template from frontend, Let there are two templates TemplA & TemplB having custom-posA and custom-posB as custom position respectively.

Now backend will show both positions (if Active) under position dropdown. And if the same behaviour is provided on frontend too then user can choose either of two positions through dropdown.

If TemplA is active and user chooses custom-posB as a position of a module then he/she won't be able to edit the module again as it will not be visible anywhere on the current/active template anymore.

I know there are lots of ifs, I think it is a valid and possible scenario in which something unexpected will and probably can happen leaving the state un-editable for the user having restricted rights.

@Bakual I think it is possible. It is just that whether we want it that way or not.

avatar sovainfo
sovainfo - comment - 6 Aug 2015

There is no protection against stupidity! Not everything can be done from front-end, possible mistakes have to be corrected in the backend. Considering these misstakes can be made with the reduced options, you might as well allow them to be made with the custom options as well.

When the experience in the front-end is going to be different from the back-end don't bother to allow it in the front-end!

avatar Achal-Aggarwal
Achal-Aggarwal - comment - 7 Aug 2015

So in conclusion we should not give option to select any custom position on front-end, Am I right?

avatar Bakual
Bakual - comment - 7 Aug 2015

The conclusion is that you can't prevent users from doing stupid things anyway. Like for example unpublish the module which can't be fixed from frontend anymore. If you try, you restrict users who want to do perfectly fine things, which is worse.

As said, the frontend should behave exactly the same as the backend. There is no reason to restrict the frontend editing in functionality.
So please allow the users to select any custom position (or even create new ones) exactly as it is in backend.

avatar sovainfo
sovainfo - comment - 7 Aug 2015

In my opinion you should be able to select the custom positions in the front-end. Those are the positions used on the site.

avatar Achal-Aggarwal
Achal-Aggarwal - comment - 8 Aug 2015

I have added another commit which basically adds all active positions in the list. Same as back-end behaviour, user now can select any custom position currently active and can assign new custom position.

Note: There is lots of duplicated code (copied from com_module). I didn't wanted to make dependency of front-end module editing on back-end com_module.

avatar conconnl
conconnl - comment - 26 Jun 2016

@Achal-Aggarwal can you write a Test scenario, so people can test your patch?


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

avatar brianteeman brianteeman - test_item - 25 Aug 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 25 Aug 2016

I have tested this item successfully on cda9f80


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

avatar brianteeman brianteeman - change - 25 Aug 2016
The description was changed
avatar brianteeman brianteeman - edited - 25 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - change - 25 Aug 2016
Category Front End Front End Components
avatar brianteeman
brianteeman - comment - 25 Aug 2016

Added test instructions to the original post


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

avatar veronikapatel
veronikapatel - comment - 29 Aug 2016

-->I have tested successfully
Before Patch
screen shot 2016-08-29 at 08 06 59

After Patch
screen shot 2016-08-29 at 08 07 35


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

avatar veronikapatel veronikapatel - test_item - 29 Aug 2016 - Tested successfully
avatar veronikapatel
veronikapatel - comment - 29 Aug 2016

I have tested this item successfully on cda9f80


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

avatar zero-24 zero-24 - change - 29 Aug 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 29 Aug 2016

RTC. If a maintainer merge this before the CS Pr gets merged please ping me CS PR against this repo is: Achal-Aggarwal#1


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

avatar joomla-cms-bot joomla-cms-bot - change - 29 Aug 2016
Labels Added: ?
avatar rdeutz
rdeutz - comment - 29 Aug 2016

@Achal-Aggarwal can you merge the CS fix so we can merge this one. Thanks

avatar zero-24
zero-24 - comment - 29 Aug 2016

@rdeutz feel free to merge i can send a PR after the merge this PR is over a year old.

avatar rdeutz rdeutz - close - 29 Aug 2016
avatar rdeutz rdeutz - merge - 29 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - close - 29 Aug 2016
avatar rdeutz rdeutz - change - 29 Aug 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-08-29 20:25:09
Closed_By rdeutz
avatar joomla-cms-bot joomla-cms-bot - change - 29 Aug 2016
Labels Removed: ?
avatar zero-24
zero-24 - comment - 29 Aug 2016

done at #11843

Add a Comment

Login with GitHub to post a comment