No Code Attached Yet bug
avatar brianteeman
brianteeman
5 Sep 2022

Steps to reproduce the issue

Create a module and put it in any of the foillowing positions in the cassiopeia template

  • topbar
  • below-top
  • menu
  • search
  • banner
  • breadcrumbs
  • footer

Set the title to Show
Set any of the fields in the Advanced tab

Expected result

Title is displayed
Value of the fields are used

Actual result

No title
Values are ignored

Additional comments

The reason for this is that the template uses the chrome/style of "none" for all these positions. The chrome doesnt support title or any of the advanced fields.

This is just rediculous. What is the point in having all these options if they cant be used. I am sick and tired of answering questions related to this on the forums and elsewhere.

I'm an advanced user so I know I can change the Style in the advanced tab to a more sensible chrome/style such as html5 but for everyone else joomla is broken and doesnt work

Its not even as if I can get a clue about the style that is being used for a position without digging into the php of the template because it just says "inherited".

How would I fix this

Option 1

change the template to use style=html5 instead of style=none

Option 2

change the chrome none.php to support all the options

avatar brianteeman brianteeman - open - 5 Sep 2022
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Sep 2022
avatar brianteeman
brianteeman - comment - 5 Sep 2022
avatar crystalenka
crystalenka - comment - 5 Sep 2022

I support option 1, because style=none is useful in some cases. But I agree the default should be one that supports all the options available in the module parameters.

avatar crystalenka
crystalenka - comment - 5 Sep 2022

This should be a relatively quick fix, but may break some templates/overrides/sites because the output is different (which is part of the problem). If someone styled a site based on the style=none modules, it may not work if the default style changes.

@bembelimen I can open a PR for this, but would it be a breaking change? If so, how big of a breaking change? Seems silly to wait for J5, but it is a frustration. Would it be possible to set the default for new installations without breaking existing sites, or something?

avatar brianteeman
brianteeman - comment - 5 Sep 2022

One of the problems is that when you create a new module show title is set to yes
So if the template is changed from "none" to "html5" then the titles will magically appear on all sites

avatar coolcat-creations
coolcat-creations - comment - 5 Sep 2022

if I set it to html5 another problem appears: the header tag is nested and twice:
grafik

Edit: Sorry :-) LOL it was because I placed it into the header...

avatar coolcat-creations
coolcat-creations - comment - 5 Sep 2022

I think it would be nice to have "cards" for the different Chrome Styles and display them with a preview of what the user can expect. Something like small wireframes. I could draw them if there is interest in that. But we would need a feature to attach a svg icon to preview the different styles.

grafik

avatar brianteeman
brianteeman - comment - 5 Sep 2022

My only concerns right now is

  1. module options dont work and almost no one knows why
avatar coolcat-creations
coolcat-creations - comment - 5 Sep 2022

My only concerns right now is

1. module options dont work and almost no one knows why

I agree. Also for example the Bootstrap size does not work for anything as far as I am concerned. Correct me if I am wrong.

avatar coolcat-creations
coolcat-creations - comment - 5 Sep 2022

Can we check if the chrome is using title or setting at all and if not display a warnung below the setting?

avatar brianteeman
brianteeman - comment - 5 Sep 2022

Can we check if the chrome is using title or setting at all and if not display a warnung below the setting?

no. because we dont actually know what chrome is being used. the module only knows it is using "inherited"

avatar coolcat-creations
coolcat-creations - comment - 5 Sep 2022

But inherited from what is a big question. From the template? then it has to check the template. But I fear thats quite impossible...

avatar Fedik
Fedik - comment - 5 Sep 2022

Well, It not something new, it expected behavior. Probably since we have "chrome" style. Most of "joomlers" aware about it.
Yes, I understand it looks unintuitive for beginners, and may confuse.

avatar crystalenka
crystalenka - comment - 5 Sep 2022

Well, It not something new, it expected behavior. Probably since we have "chrome" style. Most of "joomlers" aware about it.
Yes, I understand it looks unintuitive for beginners, and may confuse.

It is not expected behavior that the default chrome will not actually respect any of the module settings. Also, in Joomla 3, the default was html (I believe) so it worked as expected.

It may not be new, but that doesn't mean we can't make it better.

avatar coolcat-creations
coolcat-creations - comment - 5 Sep 2022

@Fedik thats not really an argument for leaving it like that if most of the current users (how many?) get along with it. Let's try to find a solution that also onboards not experienced users and new users... :-)

If we know to which menu items the module is assigned to, we can find out which template styles it is using.
It can even be it's using a lot of different template styles.

Through the template style we can find out what chrome is used / what chromes are used.
The settings could then maybe appear depending on which of the chromes are active?

avatar crystalenka
crystalenka - comment - 5 Sep 2022

My only concerns right now is

1. module options dont work and almost no one knows why

I agree. Also for example the Bootstrap size does not work for anything as far as I am concerned. Correct me if I am wrong.

I think you are right, as far as Cassiopeia is concerned. But if Cassiopeia will be the Bootstrap template going forward, perhaps the issue is that the template doesn't do anything with them.

avatar coolcat-creations
coolcat-creations - comment - 5 Sep 2022

grafik

avatar angieradtke
angieradtke - comment - 5 Sep 2022

I think by default it should be, that all parameters work as desired. So html5 should be default, also in Cassiopeia.

Maybe it needs an additional helptext that this setting is also affected by the used template.

I thinks icons @coolcat-creations are helpful , but if the style is affected by the template, we don't know how the module will be renderd. As a developer I don't want to go without "none". This allows me clean code.

avatar Fedik
Fedik - comment - 5 Sep 2022

It is not expected behavior that the default chrome will not actually respect any of the module settings. Also, in Joomla 3, the default was html (I believe) so it worked as expected.

This kind of template design flaw, it would need something different than style="none" by default, I not sure we can change it for Cassiopeia.
Joomla 3 also have multiple default positions set to none.

<jdoc:include type="modules" name="position-0" style="none" />

<jdoc:include type="modules" name="position-1" style="none" />

<jdoc:include type="modules" name="position-2" style="none" />

It may not be new, but that doesn't mean we can't make it better.

I did not say we can't do better, I just remind that it not a new, and how whole crome thing works ?
By "chrome" API design it expected behavior.

If we know to which menu items the module is assigned to, we can find out which template styles it is using.
It can even be it's using a lot of different template styles.

And what about "render module" plugin? ?

avatar coolcat-creations
coolcat-creations - comment - 5 Sep 2022

The icons would be wireframes provided by the chromes. No specific stying but an idea for the user how the structure looks like.

avatar Fedik
Fedik - comment - 5 Sep 2022

@coolcat-creations yeah, maybe drop "inherit" and use "html5" (as default) not a bad idea, in result it will be more obvious what is going on.
In theory.

avatar coolcat-creations
coolcat-creations - comment - 5 Sep 2022

I would not drop inherit. Inherit means it uses the template style so if I have 5 Styles I can define which style is used in each of the templates instead creating 5 Modules.
But it would be good to pass the information back to the module which styles are being used.
Normally only one - but sometimes there could be more styles in use.

avatar brianteeman
brianteeman - comment - 5 Sep 2022

Well, It not something new, it expected behavior. Probably since we have "chrome" style. Most of "joomlers" aware about it. Yes, I understand it looks unintuitive for beginners, and may confuse.

what is new is that the chrome doesnt support the module options

avatar Fedik
Fedik - comment - 5 Sep 2022

what is new is that the chrome doesnt support the module options

Try the same test for joomla 3, for position position-0, position-1, position-2.
You will get the same result.
Position with style none does not customisable by design.

avatar chmst
chmst - comment - 5 Sep 2022

A simple solution would be: set a default layout "html5" for some positions in the template index.php where protostar had the default value "xhtml".

avatar Fedik
Fedik - comment - 6 Sep 2022

I think it make sense to link this issue:

avatar coolcat-creations
coolcat-creations - comment - 6 Sep 2022

I thought they were ported to layouts already?

avatar Fedik
Fedik - comment - 6 Sep 2022

yes it is, but that not all ?
In linked PR #23570 was discussion about allowing XML for chrome style, so each chrome would have own config fields.

oh, and that already should be possible since 4.1 #23577

avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 17 Feb 2023

Add a Comment

Login with GitHub to post a comment