FLEXIcontent - Universal Content Module - Hide if empty does not work

1 year 2 months ago - 1 year 2 months ago #69382 by lipatovroman
Hi!
I use Advanced Module Manager.
It have option - Hide if empty.



I have tested this option with native Joomla Custom HTML module. When it's empty - module does not displays.

But when FLEXIcontent - Universal Content Module don't have any items to display - module still displays.

Also, I found that it happens only if module placed first (at the top) in side bar.



I think it because first Universal Content Module have some hidden text or code even if no items for displaying.

May be this code:



So, to fix it, I have to remove this code from /modules/mod_flexicontent/mod_flexicontent.php



The main question is how to override this file - /modules/mod_flexicontent/mod_flexicontent.php ?

Or, may be you can fix it. Display styles only if we have items in module.

Thanks.

Please Log in or Create an account to join the conversation.

1 year 2 months ago - 1 year 2 months ago #69391 by ggppdk
Hello

you have configured module to inject the CSS inside the HTML code !
you can disable the above feature in module's configuration

but i understand that this can be considered a bug

ideally
- we should wait for module to finish its output
- cature output and check if it is empty
- and only if not empty add module's CSS into head or inside append to module's HTML

i would be hesitant to add fix in v3.2.1.1

probably better include fix in 3.2.2


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

1 year 2 months ago #69425 by lipatovroman

you have configured module to inject the CSS inside the HTML code !


I tried both modes:



No difference.

So, will wait for fix.

Please Log in or Create an account to join the conversation.

11 months 4 weeks ago - 11 months 4 weeks ago #70675 by lipatovroman
Hello!

It still not fixed...

Each time, after updating FC I have to edit /modules/mod_flexicontent/mod_flexicontent.php

I removed this code:

if ($add_ccs && $layout)
{
	// Work around for extension that capture module's HTML 
	if ($add_ccs==2)
	{
		// Active module layout css (optional)
		if (file_exists(dirname(__FILE__).DS.'tmpl'.DS.$layout.DS.$layout.'.css'))
		{
			echo flexicontent_html::getInlineLinkOnce(JUri::base(true).'/modules/'.$modulename.'/tmpl/'.$layout.'/'.$layout.'.css', array('version'=>FLEXI_VHASH));
		}
 
		// Module 's core CSS
		echo flexicontent_html::getInlineLinkOnce(JUri::base(true).'/modules/'.$modulename.'/tmpl_common/module.css', array('version'=>FLEXI_VHASH));
 
		// Component CSS with optional override
		echo flexicontent_html::getInlineLinkOnce(JUri::base(true).'/components/com_flexicontent/assets/css/flexicontent.css', array('version'=>FLEXI_VHASH));
		if (file_exists(JPATH_SITE.DS.'templates'.DS.$app->getTemplate().DS.'css'.DS.'flexicontent.css'))
		{
			echo flexicontent_html::getInlineLinkOnce(JUri::base(true).'/templates/'.$app->getTemplate().'/css/flexicontent.css', array('version'=>FLEXI_VHASH));
		}
	}
 
	// Standards compliant implementation by placing CSS link into the HTML HEAD
	else
	{

And now module hides when it's empty.

Can you fix it?

Please Log in or Create an account to join the conversation.

11 months 4 weeks ago #70678 by ggppdk
Hello

the setting that you posted is not relevant

- that setting is not a CSS setting of the module

it is a CSS setting of the layout, and the layout will not be loaded anyway if module is empty


The setting about adding CSS inline is at TAB
"Cache / Styling"

please go there and make sure that it is not
"CSS links inside HTML" !


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

11 months 4 weeks ago #70683 by lipatovroman
Hello Georgios!
See my previous post . It was posted 2 months ago.

Please Log in or Create an account to join the conversation.

11 months 4 weeks ago #70684 by lipatovroman
Ok, sorry. You are right.
I found working settings:



Thanks.

Please Log in or Create an account to join the conversation.

10 months 1 hour ago #71391 by ggppdk
Hello

about "Use component setting" indeed it has a bug
and the bug make CSS / JS to be added inline i have already made a fix for next release


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

10 months 1 hour ago #71392 by lipatovroman

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.