CGContentUtils Error

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
andrewvideouk
Forum Members
Forum Members
Posts: 156
Joined: Thu Aug 20, 2020 10:49 pm

CGContentUtils Error

Post by andrewvideouk »

Hi Guys

How i can fix the error below. Its shows the error when a user don't have Permissions to use it. But work great if the user have Permission to use it.
It would be great to hide the tab if the user the don't have Permission.

Thank you



In the tempate. (Error)

Code: Select all

{eval var={content_module module=CGContentUtils block="Code_Top" name='Code_Top' tab="Page Code" groups='admin' }}
{$content}
{eval var={content_module module=CGContentUtils block="Code_Bottom" name='Code_Bottom' tab="Page Code" groups='admin'}}

In the tempate. (No Error but not all smarty stuff works.)

Code: Select all

{content_module module=CGContentUtils block="Code_Top"}
{$content}
{content_module module=CGContentUtils block="Code_Bottom"}

Code: Select all

Warning: count(): Parameter must be an array or an object that implements Countable in /home/backdrop/public_html/tmp/templates_c/CMSContentManager^28d3fefc35b1733c24f2fa8d1daa3c2deacb5954_1.module_file_tpl.CMSContentManager;admin_editcontent.tpl.php on line 324
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1825
Joined: Wed Feb 25, 2009 4:25 am

Re: CGContentUtils Error

Post by DIGI3 »

Generally you'd suppress errors from display, and on a production site people typically suppress warnings from their error log too as they're just that - warnings. If you don't want to do that, you'd have to fork the module and update it for your current PHP version - the author is no longer supporting it.

See https://www.cmsmadesimple.org/module-forking-project for more details regarding unsupported modules.
Not getting the answer you need? CMSMS support options
andrewvideouk
Forum Members
Forum Members
Posts: 156
Joined: Thu Aug 20, 2020 10:49 pm

Re: CGContentUtils Error

Post by andrewvideouk »

Thank you
I just had place around with Extended Content Blocks 2. How to you hide from other groups. groups='admin' not working. Its showing on all groups.
Also I cant find the moddule installed in the CMSMS omly in module manger. Is that normall?

Code: Select all

{content_module module="ECB2" field="textarea" block="Code_Top2"  tab="Page Code" label="Code Top" description="Smarty code" groups='admin'}
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1825
Joined: Wed Feb 25, 2009 4:25 am

Re: CGContentUtils Error

Post by DIGI3 »

I don't think it has an admin interface so doesn't need a listing in the admin navigation. If you feel it should you could always put in a feature request.

I don't see anything about it having a groups parameter either, so you may need to request that too if you need it. I'm not sure if it would inherit the {content} tag's "adminonly=true" parameter, I haven't tested it - but if so it would grant some limited functionality for that.
Not getting the answer you need? CMSMS support options
andrewvideouk
Forum Members
Forum Members
Posts: 156
Joined: Thu Aug 20, 2020 10:49 pm

Re: CGContentUtils Error

Post by andrewvideouk »

no joy with adminonly=true parameter. I well ask for a feature request. For now I will stick to CGContentUtils and suppress errors from displaying.

I am guessing I can add error_reporting(0); to . php.in or .user.ini file to suppress errors.

Thank you for your help and time.
Post Reply

Return to “Modules/Add-Ons”