{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/6007","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6007/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6007/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6007/events","html_url":"https://github.com/joomla/joomla-cms/issues/6007","id":56905789,"number":6007,"title":"Not correct \"Count Module positions\"","user":{"login":"radik10","id":9926469,"avatar_url":"https://avatars.githubusercontent.com/u/9926469?v=3","gravatar_id":"","url":"https://api.github.com/users/radik10","html_url":"https://github.com/radik10","followers_url":"https://api.github.com/users/radik10/followers","following_url":"https://api.github.com/users/radik10/following{/other_user}","gists_url":"https://api.github.com/users/radik10/gists{/gist_id}","starred_url":"https://api.github.com/users/radik10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radik10/subscriptions","organizations_url":"https://api.github.com/users/radik10/orgs","repos_url":"https://api.github.com/users/radik10/repos","events_url":"https://api.github.com/users/radik10/events{/privacy}","received_events_url":"https://api.github.com/users/radik10/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/No%20Code%20Attached%20Yet","name":"No Code Attached Yet","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-07T10:03:13Z","updated_at":"2015-02-08T15:25:45Z","closed_at":"2015-02-08T02:22:53Z","body":"#### Steps to reproduce the issue\r\nPublish \"Syndication Feeds Module\" or \"Similar Tags Module\" in Protostar template in to the position-7 or position-8. Other modules unpublish from those positions. \r\nIf this module has empty results (= not displayed module), that module position can't be calculated (and must be ignored) by Joomla! 3.3.6.\r\n\r\n\r\n#### Expected result\r\nWith 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).\r\n\r\n\r\n#### Actual result\r\nBlank 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. \r\n\r\n\r\n#### System information (as much as possible)\r\nDatabase Version: \t5.5.25a\r\nDatabase Collation: \tutf8_general_ci\r\nPHP Version: \t5.4.4\r\nWeb Server: \tApache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4\r\nWebServer to PHP Interface: \tapache2handler\r\nJoomla! Version: \tJoomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT\r\nJoomla! Platform Version: \tJoomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT\r\nUser Agent: \tMozilla/5.0 (Windows NT 5.1; rv:35.0) Gecko/20100101 Firefox/35.0 \r\n\r\n#### Additional comments\r\nIt 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).\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/73415368","html_url":"https://github.com/joomla/joomla-cms/issues/6007#issuecomment-73415368","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6007","id":73415368,"user":{"login":"mbabker","id":368545,"avatar_url":"https://avatars.githubusercontent.com/u/368545?v=3","gravatar_id":"","url":"https://api.github.com/users/mbabker","html_url":"https://github.com/mbabker","followers_url":"https://api.github.com/users/mbabker/followers","following_url":"https://api.github.com/users/mbabker/following{/other_user}","gists_url":"https://api.github.com/users/mbabker/gists{/gist_id}","starred_url":"https://api.github.com/users/mbabker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbabker/subscriptions","organizations_url":"https://api.github.com/users/mbabker/orgs","repos_url":"https://api.github.com/users/mbabker/repos","events_url":"https://api.github.com/users/mbabker/events{/privacy}","received_events_url":"https://api.github.com/users/mbabker/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T15:25:45Z","updated_at":"2015-02-08T15:25:45Z","body":"> \"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.\"\r\n> --- 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.\r\n\r\nThe 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."}}