?
avatar radik10
radik10
7 Feb 2015

Steps to reproduce the issue

Publish "Syndication Feeds Module" or "Similar Tags Module" in Protostar template in to the position-7 or position-8. Other modules unpublish from those positions.
If this module has empty results (= not displayed module), that module position can't be calculated (and must be ignored) by Joomla! 3.3.6.

Expected result

With blank/empty results of those modules (e.g. no RSS in article view), mean if is RSS module in position-7 or position-8 (left or right sides of template) is empty, that positions should not be displayed (calculated), But now Joomla! 3.3.6 is displaying empty module position-7 or position-8 as blank column, but that column of template should not be visible (in case you don't have other modules in that position).

Actual result

Blank columns if you have in Protostar template published (in positon-7,8) only RSS or Similar tags modules. But it is not bug of Protostar template, it is bug of Joomla when is calculating positions.

System information (as much as possible)

Database Version: 5.5.25a
Database Collation: utf8_general_ci
PHP Version: 5.4.4
Web Server: Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4
WebServer to PHP Interface: apache2handler
Joomla! Version: Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
Joomla! Platform Version: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:35.0) Gecko/20100101 Firefox/35.0

Additional comments

It is annoying to have empty columns in template (in case that RSS or similar tags modules have empty resaults and are only ones in that positions).

avatar radik10 radik10 - open - 7 Feb 2015
avatar radik10 radik10 - change - 7 Feb 2015
The description was changed
avatar rdeutz
rdeutz - comment - 7 Feb 2015

This is the behaviour since Joomla 1.5 (maybe 1.0) so this is at least something we can't change now, but I agree it would be great if we could extend it so that the count respect if there is content or not.

avatar brianteeman
brianteeman - comment - 7 Feb 2015

I disagree that an empty module should equal a non existing module. They
are not the same thing.

If I build a site and put a module in a position I must be able to see
where it is displayed, and how that effects the site layout, even before it
has any content.

Secondly do you really want to have your site layout constantly changing
because of the content of a module. Eg feed present you have 2 columns.
Feed empty you have 1 column.

avatar brianteeman brianteeman - change - 7 Feb 2015
Priority Critical Low
avatar brianteeman
brianteeman - comment - 7 Feb 2015
avatar brianteeman brianteeman - change - 7 Feb 2015
Labels Added: ?
avatar wilsonge
wilsonge - comment - 8 Feb 2015

I should also add the entire premise of nonumbers nothing module depends on this behaviour (empty module means position is filled. So this is definitely not something we can do in a b/c fashion. I'm going to close this as expected behaviour

avatar wilsonge wilsonge - change - 8 Feb 2015
Status New Expected Behaviour
Closed_Date 0000-00-00 00:00:00 2015-02-08 02:22:52
Closed_By wilsonge
avatar wilsonge wilsonge - change - 8 Feb 2015
Closed_Date 2015-02-08 02:22:52 2015-02-08 02:22:53
avatar wilsonge wilsonge - close - 8 Feb 2015
avatar wilsonge wilsonge - close - 8 Feb 2015
avatar radik10
radik10 - comment - 8 Feb 2015

Hi guys, I think, Joomla must be customizable as much as possible... and not to put barriers in webpage development... Joomla now is not enough flexible, is extremely complicated.

brianteeman said:
"If I build a site and put a module in a position I must be able to see where it is displayed, and how that effects the site layout, even before it has any content."
--- my reply: it is not problem, because you can see modules in their positions with template preview (www.webpage.xx/index.php?tp=1&templateStyle=yy)

"Secondly do you really want to have your site layout constantly changing because of the content of a module. Eg feed present you have 2 columns. Feed empty you have 1 column."
--- my reply: where is problem? module positions are counted for every genarated page/subpage during their loading... there is only 1 more step (to determine if any module have any content in left/right columns and close or not that module position/column), thats all.

avatar rdeutz
rdeutz - comment - 8 Feb 2015

As already said, the behaviour can't be change now, but you could add a parameter countEmptyModules=true to the function. @radik10 would you make a PR?

avatar radik10
radik10 - comment - 8 Feb 2015

Sorry, I am not sure what is "PR". But I have solved my problem by moving the module to another module position (outside the left and right columns in template).
Thanks.

avatar mbabker
mbabker - comment - 8 Feb 2015

"Secondly do you really want to have your site layout constantly changing because of the content of a module. Eg feed present you have 2 columns. Feed empty you have 1 column."
--- my reply: where is problem? module positions are counted for every genarated page/subpage during their loading... there is only 1 more step (to determine if any module have any content in left/right columns and close or not that module position/column), thats all.

The problem with doing that is now you have an inconsistent layout on your page. It would be entirely possible for columns to disappear which would affect your page's appearance, potentially in a negative manner. I think the behavior right now is accurate personally, when countModules is called, it is NOT rendering any modules but rather counting the number of active modules in a position for a given page (based on published modules and menu assignments). In almost every case I am aware of where that method is used, it is called before we start rendering the module position a count is requested for. It is not aware of the module's output, nor are any of our existing API methods. To account for your scenario, countModules would have to render the modules in a position which would be a breaking change in behavior for the method and give it a purpose it was not written to serve.

Add a Comment

Login with GitHub to post a comment