Page 1 of 1

BUG: Module Class Suffix in custom html module broken

Posted: Sat Feb 13, 2016 9:22 am
by mkoontz
There is a bug where if you add a class to a custom html module using the "Module Class Suffix" box under the "Advanced" tab it replicates the classes entered showing it on the front end twice. Twice meaning that it adds the classes once around the container which includes the Title and a second time around the text inside the custom html module.

To duplicate this, simply add any class you want in the "Module Class Suffix" box for a published custom html module. Preferably a class that you can see such as a border or drop shadow. Make sure the custom html module is published in either one of the "Side" positions or a "Footer" position. It appears to work fine if published elsewhere.

This is also not template specific as I have reproduced this using Protostar, Beez3, and several other 3rd party templates.

Does anyone know if this has been reported previously?

*****
Edited to add the specific positions where the problem is reproducible in the Beez3 template along with pictures. However, as I mentioned before, this problem isn't limited to just the Beez3 template. It is reproducible in Protostar as well as other 3rd party templates I have tried. This is also a clean install of Joomla.

Re: BUG: Module Class Suffix in custom html module broken

Posted: Sat Feb 13, 2016 10:13 am
by Webdongle
/edit
Confirmed in J3.4.8 stable
custom 01.JPG
Will test on nightly build and 3.5.0 beta
edit/


Only stated once in the output file url of your test please

Code: Select all

<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_custom
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
?>


<div class="custom<?php echo $moduleclass_sfx ?>" <?php if ($params->get('backgroundimage')) : ?> style="background-image:url(<?php echo $params->get('backgroundimage');?>)"<?php endif;?> >
	<?php echo $module->content;?>
</div>

Re: BUG: Module Class Suffix in custom html module broken

Posted: Sat Feb 13, 2016 10:24 am
by mkoontz
Updated my original post to more accurately reflect the positions/areas affected.

Re: BUG: Module Class Suffix in custom html module broken

Posted: Sat Feb 13, 2016 11:15 am
by Webdongle
Please report in https://issues.joomla.org/ with a link to this thread. Post the tracker link here and I will confirm it on the tracker

Re: BUG: Module Class Suffix in custom html module broken

Posted: Sat Feb 13, 2016 1:06 pm
by mkoontz

Re: BUG: Module Class Suffix in custom html module broken

Posted: Sat Feb 13, 2016 2:07 pm
by Webdongle
Thanks ... have posted to confirm. Also posted on the devs/bugsquad mailing list https://groups.google.com/d/msg/joomla- ... Z6Eg3-BAAJ

Hopefully the devs will pick up on it soon.

Re: BUG: Module Class Suffix in custom html module broken

Posted: Sat Feb 13, 2016 2:27 pm
by mkoontz
Thank you for working with me on this!

Re: BUG: Module Class Suffix in custom html module broken

Posted: Sat Feb 13, 2016 6:20 pm
by Webdongle
OK the answer is
Bakual wrote: It's the case for most modules. The reason is that this parameter is used both in the module chrome from the template and the module output itself.

I doubt we can change it without breaking something. Just write your CSS rules so it matches only one instance (eg combine your CSS rule with the other class present)
https://github.com/joomla/joomla-cms/is ... -183702745

Example
custom 02.JPG

Re: BUG: Module Class Suffix in custom html module broken

Posted: Sun Feb 28, 2016 12:22 pm
by mkoontz
I wanted to thank you properly for helping with this. It's not the answer I had hoped for but it works. Hopefully this post will help others in the future who run in to the same thing.