Page 1 of 1

CGE_minhtlm doesn't seem to work

Posted: Sun Dec 23, 2018 8:15 am
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!

Re: CGE_minhtlm doesn't seem to work

Posted: Sun Dec 23, 2018 8:55 am
by rotezecke
it's a boolean. try

Code: Select all

$config['cge_minhtml'] = true;

Re: CGE_minhtlm doesn't seem to work

Posted: Sun Dec 23, 2018 11:23 am
by Gregor
Thanks, made the adjustment, but no luck. Any other options worth trying?

Re: CGE_minhtlm doesn't seem to work

Posted: Sun Dec 23, 2018 12:06 pm
by rotezecke
did you call

Code: Select all

{cgjs_render}
in your template (recommended just before </head>) ?

Re: CGE_minhtlm doesn't seem to work

Posted: Sun Dec 23, 2018 12:45 pm
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.

Re: CGE_minhtlm doesn't seem to work

Posted: Sun Dec 23, 2018 3:31 pm
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.

Re: CGE_minhtlm doesn't seem to work

Posted: Sun Dec 23, 2018 10:13 pm
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?

Re: CGE_minhtlm doesn't seem to work

Posted: Sun Dec 23, 2018 10:42 pm
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?

Re: CGE_minhtlm doesn't seem to work

Posted: Mon Dec 24, 2018 10:31 am
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.

Re: CGE_minhtlm doesn't seem to work

Posted: Mon Dec 24, 2018 3:28 pm
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.

Re: CGE_minhtlm doesn't seem to work

Posted: Mon Dec 24, 2018 3:46 pm
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; 
?>