0

Discovering a problem with image uploads (no directory available in CK) I thought I should set the Resource Directory for images as per recommended using a variable, so I set it to "[cms.root]/images".

Now our site is not loading, giving a Cannot resolve path using "cms.root.path".

  1. I think Civi really needs to verify that the directory exists before saving the setting

  2. How do I reset that directory to something that makes the site live again?

I only changed the path to the image directory.

By overriding the image URL in civicrm.settings.php I managed to get the admin interface up again. But the site is still erroring out with Cannot resolve path using "cms.root.path". And the values in the Resource URL dialogue are read-only since they are overridden.

Are the original setting stored in the database? How can I change it?

1 Answer 1

1

In the database for your installation there is a table named civicrm_setting. Using SequelPRO, myPhpAdmin or something similar you will find entries for all settings, including the directory settings, here.

I was looking for the image upload directory and found

39    imageUploadDir    s:17:"[cms.root]/images";

With mysql you can do

select value from civicrm_setting where name = 'imageUploadDir';

The initial part (s:17) means that the content is a 's'tring with length 17, so I changed the content of the string to something reasonable, taking that into account, and the site worked again.

Don't forget to remove any possible overrides you made in civicrm.settings.php.

Also if your CiviCRM menus disappear you probably changed it to something different that it originally was.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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