Prestashop Add Theme Page Blank; Undefined class constant ‘MODE_HOST’

I tried to add a theme in Prestashop and got a white screen on the page: /index.php?controller=AdminThemes&action=importtheme&token=9e69ffe57e8be9b59bc4cd6939f24ba6

White screen means an uncaught error. You need to turn on debug mode to figure out what the error is:

In your prestashop folder > config/ change

/* Debug only */
if (!defined(‘_PS_MODE_DEV_’))
define(‘_PS_MODE_DEV_’, false);


/* Debug only */
if (!defined(‘_PS_MODE_DEV_’))
define(‘_PS_MODE_DEV_’, true);

I then got this error:

Fatal error: Undefined class constant ‘MODE_HOST’ in D:\\html\store\cache\smarty\compile\73\4c\4f\734c4fa413e8380be55605fc85f5d2d015395cdc.file.form.tpl.php on line 97

I deleted all of the folders in the compile folder.

I got a new error:

Fatal error: Undefined class constant ‘MODE_HOST’ in D:\\html\store\tools\smarty\sysplugins\smarty_internal_templatebase.php(157) : eval()’d code on line 97

I couldn’t fix that. Turns out this is a problem, so I just reinstalled the thing with and it works.

Leave a Reply

Your email address will not be published. Required fields are marked *