1

I have an issue with a site I have just put live. devMode is still enabled even though the config site sets it as false for .com.

Code snippet:

'*' => array(
        'devMode' => 'false',
        'siteName' => 'sitename',
        'omitScriptNameInUrls' => true,
        'maxUploadFileSize' => 33554432,
        'defaultSearchTermOptions' => array(
            'subLeft' => true,
            'subRight' => true,
        ),
        ),
    '.com' => array(
        'devMode' => 'false',
        'env' => 'live',

I did have a .dev option as well but removed this to see if it would make any difference but it hasn't.

Next I cleared all caches and still no joy devMode is still active. How can I clear this for the the live site has it logged it in the DB somewhere and it's not removing it?

2

You’re setting the devMode setting to the string 'false', which seems to be evaluated to true. You need to set it to a boolean.

'*' => array(
    'devMode' => false,
),
'.dev' => array(
    'devMode' => true,
),
1
  • Ah ha. Good spot carl. Will remove quotes and re-upload. School boy error!!
    – Lettie
    Nov 22 '17 at 10:41
1

The ordersequence of the environements does matter.

return array(
  '*' => array(
    //yadayadayada
  ),
  // this has priority over the lower entry
  '.com' => array(
    'devMode' => true,
  ),
  // this has even lower priority
  '.dev' => array(
    'devMode' => false,
   ),
);
3
  • Or was it vice versa? Now I'm not sure.
    – KSPR
    Nov 22 '17 at 10:30
  • No, you are right with priority. But settings in the array with the key '*' are overridden by the (matching) ones in the other keys.
    – carlcs
    Nov 22 '17 at 10:38
  • Both are set to false though!
    – Lettie
    Nov 22 '17 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.