CGE_minhtlm doesn't seem to work

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

CGE_minhtlm doesn't seem to work

Post by Gregor »

My local development site is running on the latest versions of the core and module. I added to config.php

Code: Select all

$config['cge_minhtml'] = 'true' 
However, looking at the source code, no change to be seen. Have I overlooked a parameter to get it to work?

Thanks!
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: CGE_minhtlm doesn't seem to work

Post by rotezecke »

it's a boolean. try

Code: Select all

$config['cge_minhtml'] = true;
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: CGE_minhtlm doesn't seem to work

Post by Gregor »

Thanks, made the adjustment, but no luck. Any other options worth trying?
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: CGE_minhtlm doesn't seem to work

Post by rotezecke »

did you call

Code: Select all

{cgjs_render}
in your template (recommended just before </head>) ?
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: CGE_minhtlm doesn't seem to work

Post by Gregor »

Yes, that on is there too.

Just to be sure, if I open the page source, than i would expect, based on CGE, that the html-code is hardly readable because the white spaces are removed.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGE_minhtlm doesn't seem to work

Post by DIGI3 »

I just tested it and it works fine. The only way I could get it to fail was by removing the <head> tag from my template. No tags necessary, just the config variable.
Not getting the answer you need? CMSMS support options
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: CGE_minhtlm doesn't seem to work

Post by Gregor »

I did do a test on my 'production' site, after adding $config['cge_minhtml'] = true; the source of the reduced from over 400 lines of to 16 lines of code, but with very long lines.

One of the differences is that on the 'production' site there is no template inheritance and on the development site I make use of template inheritance. Could it have something to do when template inheritance is used?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGE_minhtlm doesn't seem to work

Post by DIGI3 »

I tried it on a site using template inheritance and it's fine, so it's not that.

Here it is on a sandbox site: https://cmsmsstable.matthornsby.ca/
It just has the config entry, no tags.

Can you share the url of the site it isn't working on?
Not getting the answer you need? CMSMS support options
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: CGE_minhtlm doesn't seem to work

Post by Gregor »

Removed the {cgjs_render} tag and have just the $config['cge_minhtml'] = true; in the config.php
DIGI3 wrote: Can you share the url of the site it isn't working on?
Dropped you a pm.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1609
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGE_minhtlm doesn't seem to work

Post by DIGI3 »

It's possible all of the html errors are causing it to not be able to properly find the <head> tag. Whether or not that's the issue, it's a lot easier to troubleshoot things if you have valid html.

Can you paste your full config.php (with passwords obfuscated)?

Try it with a simple template, one of the default ones or something. If it works there, you'll know it's something in your template causing the problem and you can fix the html and troubleshoot by removing parts at a time.
Not getting the answer you need? CMSMS support options
User avatar
Gregor
Power Poster
Power Poster
Posts: 1874
Joined: Thu Mar 23, 2006 9:25 am
Location: The Netherlands

Re: CGE_minhtlm doesn't seem to work

Post by Gregor »

Code: Select all

<?php
# CMS Made Simple Configuration File
# Documentation: https://docs.cmsmadesimple.org/configuration/config-file/config-reference
#
$config['dbms'] = 'mysqli';
$config['db_hostname'] = '127.0.0.1';
$config['db_username'] = 'merry';
$config['db_password'] = 'christmas';
$config['db_name'] = 'everybody';
$config['db_prefix'] = 'cms_';
$config['timezone'] = 'Europe/Amsterdam';
$config['db_port'] = 3306;
$config['url_rewriting'] = 'mod_rewrite';
$config['root_url'] = 'xxxxxxxxxxx';
$config['uploads_url'] = 'xxxxxxxxxxx/uploads';
$config['admin_url'] = 'xxxxxxxxxxx/admin';
$config['php_memory_limit'] = '256M';
$config['developer_mode'] = false;
$config['debug'] = false;
$config['permissive_smarty'] = 1;
$config['cge_minhtml'] = true; 
?>
Post Reply

Return to “Modules/Add-Ons”