I have some trouble with my module chrome.
If I rename the PHP modules.php
in template/protostar/html
to XXXmodules.php (or anything else, just to break the link), then all the pages on my website are working.
But if I leave modules.php
as it is, then some pages* are not accessible and I get a This webpage is not available
page. On the page that are working, my custom chrome megarounded
is working as it should.
The bug also appears if I delete the content of the modules.php
or if I only leave:
defined('_JEXEC') or die('Restricted access');
Because I would like to have all the pages on my website accesible + the custom module , I am digging into the way custom chrome works, but except for the question of creating new custom chrome (which I lready know), I can't find any help.
I am trying to understand how protostar/index.php
get the link to modules.php
so I have tried to look for modules.php
in all the files of the folder template/protostar
but couldn't any link. I wonder how this modules.php get retrieved! Any idea?
Thanks a lot for your help!
- Strangely the pages that don't work are the ones that don't have a module in there HTML loaded via loadposition or module anywhere from NoNumber. In brief, a page needs at the main article to load a module in order to work.
EDIT: here is the content of my modules.php (but I doubt the error come from there as when I empty the content I still have the error, only renaming modules.php solve the error)
<?php
// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<?php
function modChrome_megarounded($module, &$params, &$attribs)
{ ?>
<div class="megamod module<?php echo $params->get('moduleclass_sfx'); ?>">
<div class="megabox">
<div class="megaboxouter">
<div class="megaboxinner">
<?php if ($module->showtitle != 0) : ?>
<h6><?php echo $module->title; ?></h6>
<?php endif; ?>
<?php echo $module->content; ?>
</div>
</div>
</div>
</div>
<?php
}
?>
modules.php
code to the question so we can see if there are any obvious issues?