CMS Made Simple Forums
https://forum.cmsmadesimple.org/

CGE_minhtlm doesn't seem to work
https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=79652
Page 1 of 1

Author:  Gregor [ Sun Dec 23, 2018 8:15 am ]
Post subject:  CGE_minhtlm doesn't seem to work

My local development site is running on the latest versions of the core and module. I added to config.php
\$1:
$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!

Author:  rotezecke [ Sun Dec 23, 2018 8:55 am ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

it's a boolean. try
\$1:
$config['cge_minhtml'] = true;

Author:  Gregor [ Sun Dec 23, 2018 11:23 am ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

Thanks, made the adjustment, but no luck. Any other options worth trying?

Author:  rotezecke [ Sun Dec 23, 2018 12:06 pm ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

did you call
\$1:
{cgjs_render}
in your template (recommended just before </head>) ?

Author:  Gregor [ Sun Dec 23, 2018 12:45 pm ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

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.

Author:  DIGI3 [ Sun Dec 23, 2018 3:31 pm ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

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.

Author:  Gregor [ Sun Dec 23, 2018 10:13 pm ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

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?

Author:  DIGI3 [ Sun Dec 23, 2018 10:42 pm ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

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?

Author:  Gregor [ Mon Dec 24, 2018 10:31 am ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

Removed the {cgjs_render} tag and have just the $config['cge_minhtml'] = true; in the config.php

DIGI3 \DIGI3:
Can you share the url of the site it isn't working on?
Dropped you a pm.

Author:  DIGI3 [ Mon Dec 24, 2018 3:28 pm ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

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.

Author:  Gregor [ Mon Dec 24, 2018 3:46 pm ]
Post subject:  Re: CGE_minhtlm doesn't seem to work

\$1:
<?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;
?>

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/