J3 Issue ?
avatar coolcat-creations
coolcat-creations
14 Sep 2017

You can use the system chromes but not the chromes from other templates. If you select one it´s just ignored and no module container set at all.

This is a issue for me when doing a relaunch of an existing template and just roll it out on some sites. When the modules have the mod_chrome from the other chrome selected in their module parameters the view is broken.

Steps to reproduce the issue

In the module Parameters:

  • Select a module Chrome from the System - it works
  • Select a module from another template then the current - no container is set around the items at all. It´s even not the "none" style.

Expected result

The module chromes should work crosstemplate wise.
Possible solutions:

  1. Giving priority to the current template chrome and display it correctly (but thats not completely the right solution) OR
  2. Displaying the chrome from the selected template

System information (as much as possible)

Joomla 3.8 but the error exists longer - just took the time to figure out why the chrome breaks.

avatar coolcat-creations coolcat-creations - open - 14 Sep 2017
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Sep 2017
avatar coolcat-creations coolcat-creations - change - 14 Sep 2017
The description was changed
avatar coolcat-creations coolcat-creations - edited - 14 Sep 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 14 Sep 2017
Category com_modules
avatar brianteeman
brianteeman - comment - 13 Oct 2017

I dont follow you here. I wouldnt expect the module chrome (or an alternative component layout) from template 1 to work with template 2

avatar coolcat-creations
coolcat-creations - comment - 13 Oct 2017

Ok imagine you have a template that has a module chrome named abcdef. You duplicate the template and it has the same module chrome. Some modules have chrome abcdef assigned in their parameters. It's the same in the old and the new template. But it stops working at this point and is broken. However if you select a system chrome from the list it does not stop working.

avatar brianteeman
brianteeman - comment - 13 Oct 2017

Joomla stores the name of the template with the name of the chrome in the db eg Beez3-beezTabs That is why it stops working - i kind of expect that to be the case. If it wasnt what would happen when you have completed the work on the new template and delete the old one - all your chromes are broken ;)

System chromes are by there very nature system wide so if selected they will always work independent of the template selected

avatar coolcat-creations
coolcat-creations - comment - 13 Oct 2017

No, actually the assignment to the chrome would be lost then in case of a template migration i would need to select the chromes everywhere. But that's not my issue. I have to refactor the template step by step, just because... And it's just an example. Could be that two independent templates use the same Chrome names, why should it be an expected behavior that the
output is broken then?

avatar coolcat-creations
coolcat-creations - comment - 13 Oct 2017

Btw Alternate Layouts do work cross templates.

avatar franz-wohlkoenig franz-wohlkoenig - change - 14 Oct 2017
Status New Discussion
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Apr 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Apr 2019
Status Discussion Information Required
avatar coolcat-creations
coolcat-creations - comment - 3 Apr 2019

There is an error if you name a module chrome same like the system template so if the same error is fired when using cross templates people will at least understand where the "bug" comes from. Thats the solution I would propose.

Second solution would be that there is only one modules.php from the system and it's overriden completely with the modules.php in the html folder. That would at least follow a part of the override logic in Joomla. But unfortunately it would break probably some templates because the override modules.php needs to carry the system functions if the template uses them.
@franz-wohlkoenig

avatar Bakual
Bakual - comment - 3 Apr 2019

In J3 it's probably not possible to solve.
In J4 we changed the chromes to use JLayouts and it already works the way you want it (I think). 😄

avatar coolcat-creations
coolcat-creations - comment - 3 Apr 2019

@Bakual exciting :) Any documentation how to migrate?

avatar Bakual
Bakual - comment - 3 Apr 2019

Documentation? What is that?
You can look at what I did in #23570
Basically you will have to copy the stuff inside the each function in modules.php to an own JLayout.

avatar saraheagle
saraheagle - comment - 3 Apr 2019

#23570 is perfect, it'll be great to be able to use module types from other templates. Thank you :)

avatar Bakual
Bakual - comment - 3 Apr 2019

@saraheagle That's already merged into 4.0 😄

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Apr 2019

@brianteeman can this Issue be closed?

avatar coolcat-creations
coolcat-creations - comment - 3 Apr 2019

Just one question - if 3.10 will be like 4.0 from the B/C is this system change from #23570 forseen to already work in 3.10 or not?

avatar brianteeman
brianteeman - comment - 3 Apr 2019

No new features in 3.10

As its not going to be changed in j3 and it is resolved in j4 then yes you can close it

avatar coolcat-creations
coolcat-creations - comment - 3 Apr 2019

Ok @franz-wohlkoenig somewhere where B/C changes are documented this will be something that will break lots of templates so it has to be written somewhere in the upgrade informations.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Apr 2019

#23570 has Label "Documentation Required".

avatar coolcat-creations
coolcat-creations - comment - 3 Apr 2019

@franz-wohlkoenig yes but that are two things. Dokumentation Required vs. Ugrade Warnings... or not?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Apr 2019

Sorry, i read "documented" and "written somewhere" and looked at Label.

avatar coolcat-creations
coolcat-creations - comment - 3 Apr 2019

Yes sorry - formulated it wrong... Is there any document which collects all B/C breaks?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Apr 2019

https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4

I did a quick search so maybe theres another doc or more is planned.

avatar Bakual
Bakual - comment - 3 Apr 2019

Yep, this has to be added to that BC issues doc. And best with a link to my PR or some other explanation how it works.

Templates that want to support bot J3 and J4 can already add those new JLayouts. In j3 they will just be ignored. When migrating to J4, the JLayout will then work and the modules.php will just be ignored.

avatar coolcat-creations
coolcat-creations - comment - 3 Apr 2019

Ok great so the other answer that this will not work in 3.10 was wrong then. Good to hear. Thank you @Bakual

avatar Bakual
Bakual - comment - 3 Apr 2019

@coolcat-creations The JLayouts will not work in 3.10. Brian said that correctly. It will only work with 4.x.

However you can write a template which works both in 3.x and 4.x by adding both the current modules.php and the new JLayouts. That's what I meant.

avatar coolcat-creations
coolcat-creations - comment - 3 Apr 2019

Got it, thanks!

avatar joomla-cms-bot joomla-cms-bot - change - 11 Mar 2020
Status Fixed in Code Base Closed
Closed_Date 2020-03-11 16:17:21 2020-03-11 16:17:22
Closed_By jwaisner joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 11 Mar 2020
avatar jwaisner jwaisner - change - 11 Mar 2020
Status Information Required Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-03-11 16:17:21
Closed_By jwaisner
avatar joomla-cms-bot
joomla-cms-bot - comment - 11 Mar 2020

Set to "closed" on behalf of @jwaisner by The JTracker Application at issues.joomla.org/joomla-cms/17953

avatar jwaisner
jwaisner - comment - 11 Mar 2020

As this has been fixed in J4 and is confirmed to not be resolvable in J3. Closing this entry.


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

avatar ReLater
ReLater - comment - 11 Mar 2020

Yep, this has to be added to that BC issues doc. And best with a link to my PR...

Done: https://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_4#Modules

Add a Comment

Login with GitHub to post a comment