You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Symptom 1: Unable to toggle debug mode from the back-office. An error is thrown. Permissions are set correctly.
or
Symptom 2: The toggle switch shows debug is OFF but the top shows debug is ON.
Error: Could not find whether debug mode is enabled. Make sure that the correct permissions are set on the file /var/www/html/app/../config/defines.inc.php
This repo provides PrestaShop a defines_custom.inc.php. A boolean casted getenv function is used to define the PS_MODE_DEV constant. PrestaShop validates this file by using a regex which does not match this format. PrestaShop expects a true or false value in order for this regex to match.
This PrestaShop regex does not match (bool) getenv('PS_DEV_MODE')
# src/Adapter/Debug/DebugMode.php
private function updateDebugModeValueInCustomFile($value)
{
...
if (!preg_match('/define\(\'_PS_MODE_DEV_\', ([a-zA-Z]+)\);/Ui', $cleanedFileContent)) {
....
}
Solution
Go into config/defines_custom.inc.php and replace (bool) getenv('PS_DEV_MODE') with true or false
The text was updated successfully, but these errors were encountered:
Problem
Symptom 1: Unable to toggle debug mode from the back-office. An error is thrown. Permissions are set correctly.
or
Symptom 2: The toggle switch shows debug is OFF but the top shows debug is ON.
This problem has been reported on two occasions.
PrestaShop/PrestaShop#30773
PrestaShop/PrestaShop#26400
Diagnosis
This repo provides PrestaShop a defines_custom.inc.php. A boolean casted getenv function is used to define the PS_MODE_DEV constant. PrestaShop validates this file by using a regex which does not match this format. PrestaShop expects a
true
orfalse
value in order for this regex to match.This PrestaShop regex does not match
(bool) getenv('PS_DEV_MODE')
Solution
Go into
config/defines_custom.inc.php
and replace(bool) getenv('PS_DEV_MODE')
withtrue
orfalse
The text was updated successfully, but these errors were encountered: