Template Module Positions - Display Issues Topic is solved

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
User avatar
PhilOSparta
Joomla! Guru
Joomla! Guru
Posts: 532
Joined: Sun Feb 25, 2007 10:44 pm
Location: New Jersey, USA
Contact:

Template Module Positions - Display Issues

Post by PhilOSparta » Wed Nov 17, 2021 2:15 pm

Under the Template: Options there is a selection for Preview Module Positions. When this is Enabled and the URL of the site is appended with ?tp=1, the occupied positions are displayed.

Casiopeia has 16 positions, but only 5 are displayed when no modules are loaded on the page. i.e. topbar, below-top, breadcrumbs, main-top, main-bottom and debug.
In Joomla! V3 all positions were displayed even without modules assigned to them thus giving the web site designer the knowledge of all position locations whether they were occupied or not.

Is there any way in V4 to turn on Preview of all positions without loading a dummy module into each and every one?
Is it possible that this is a template specific issue?

User avatar
Jaydot
Joomla! Guru
Joomla! Guru
Posts: 556
Joined: Sun Jun 04, 2017 12:11 pm
Location: The Netherlands
Contact:

Re: Template Module Positions - Display Issues

Post by Jaydot » Wed Nov 17, 2021 3:53 pm

Are you sure J!3 displayed all module positions with or without content? I don't think it did, but I could be wrong.

Anyway, I don't know the answer to your questions, but I wanted to know where the positions were too, so I pulled all the html out of Cassiopeia's index.php to see...

Here's the result: https://jaydot.nl/artikelen/joomla-4/ca ... -positions
The fact that an opinion is widely held is no evidence whatsoever that it is not utterly absurd.
Personal website: https://jaydot.nl

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28860
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Template Module Positions - Display Issues

Post by Per Yngve Berg » Wed Nov 17, 2021 4:04 pm

The template uses the countmodules() function to deside if a module position shall be shown.

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12474
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Template Module Positions - Display Issues

Post by brian » Wed Nov 17, 2021 5:52 pm

@philosparta I consider this change in behaviour to be a bug. You are quite correct that there is no point in the preview if you can't see everything. Please can you report this on the issue tracker https://issues.joomla.org

@per guess you missed the point of the preview feature
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 28860
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Template Module Positions - Display Issues

Post by Per Yngve Berg » Wed Nov 17, 2021 8:08 pm

I did not missed the point.

The countmodules() must return 1 when Preview is on.

User avatar
PhilOSparta
Joomla! Guru
Joomla! Guru
Posts: 532
Joined: Sun Feb 25, 2007 10:44 pm
Location: New Jersey, USA
Contact:

Re: Template Module Positions - Display Issues

Post by PhilOSparta » Thu Nov 18, 2021 12:27 pm

@jaydot Thanks for your link. That's very helpful.
@brian - I've taken your request and submitted a report. ( My first )
https://issues.joomla.org/tracker/joomla-cms/36071

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12474
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Template Module Positions - Display Issues

Post by brian » Thu Nov 18, 2021 12:31 pm

Thank you
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12474
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Template Module Positions - Display Issues

Post by brian » Thu Nov 18, 2021 12:45 pm

I have identified the bug (related to module cache) and hopefully it will be fixed shortly
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
PhilOSparta
Joomla! Guru
Joomla! Guru
Posts: 532
Joined: Sun Feb 25, 2007 10:44 pm
Location: New Jersey, USA
Contact:

Re: Template Module Positions - Display Issues

Post by PhilOSparta » Tue Jan 18, 2022 11:58 am

This problem has just been fixed in release 4.0.6.


Post Reply

Return to “Templates for Joomla! 4.x”