3

I updated my CiviCRM plugin for Wordpress to 5.30.1 from a recent version (5.27 if I recall).

Since the update, I get an error appearing in debug.log multiple times per page load saying:

PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in /<my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 84

AND

PHP Notice:  Undefined property: CRM_Core_Config::$uploadDir in /<my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php

Additionally, on Contact pages a CiviCRM error pops up saying say "Supplied mime-type is not accepted" and this is preventing the standard use of CiviCRM. Also the images are not loading (missing?) on Contact pages. All the paths are working but if I try to upload a new image for a Contact, it does not appear anywhere on the server.

  • I suspect the issue is the folders for $extensionsDir and $uploadDir but the permissions are correct (I reset them).

  • I have tried deleting the image for a contact, re-uploading and still nothing appears on the server.

My settings:

Temporary Files Directory => [civicrm.files]/upload/ Image Directory => [civicrm.files]/image-directory/ Custom Files Directory => [civicrm.files]/custom/ Extensions Directory => [civicrm.files]/ext/

Running echo Civi::paths()->getPath("[civicrm.files]/") gives me:

<my-website>/public_html/wp-content/uploads/civicrm/

Any help or direction would be greatly appreciated.

Edit 1

If I output the variables, you can see from a single call that the variables are empty and are only all defined in the last of the calls. I thought this might be useful.

[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 86
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 86
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsURL in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 87
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 86
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsURL in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 87
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$uploadDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 88
[26-Oct-2020 16:32:28 UTC] Array
(
    [extensionsDir] =>
    [extensionsURL] =>
    [uploadDir] =>
)

[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 91
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsURL in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 92
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$uploadDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 94
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 86
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsURL in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 87
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$uploadDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 88
[26-Oct-2020 16:32:28 UTC] Array
(
    [extensionsDir] =>
    [extensionsURL] =>
    [uploadDir] =>
)

[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 91
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsURL in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 92
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$uploadDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 94
[26-Oct-2020 16:32:28 UTC] Array
(
    [extensionsDir] =>
    [extensionsURL] =>
    [uploadDir] => <my-website>/public_html/wp-content/uploads/civicrm/upload/
)

[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 91
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsURL in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 92
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 86
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsURL in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 87
[26-Oct-2020 16:32:28 UTC] Array
(
    [extensionsDir] =>
    [extensionsURL] =>
    [uploadDir] => <my-website>/public_html/wp-content/uploads/civicrm/upload/
)

[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 91
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsURL in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 92
[26-Oct-2020 16:32:28 UTC] Array
(
    [extensionsDir] =>
    [extensionsURL] => <my-url>/wp-content/uploads/civicrm/ext/
    [uploadDir] => <my-website>/public_html/wp-content/uploads/civicrm/upload/
)

[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 91
[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 86
[26-Oct-2020 16:32:28 UTC] Array
(
    [extensionsDir] =>
    [extensionsURL] => <my-url>/wp-content/uploads/civicrm/ext/
    [uploadDir] => <my-website>/public_html/wp-content/uploads/civicrm/upload/
)

[26-Oct-2020 16:32:28 UTC] PHP Notice:  Undefined property: CRM_Core_Config::$extensionsDir in <my-website>/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 91
[26-Oct-2020 16:32:28 UTC] Array
(
    [extensionsDir] => <my-website>/public_html/wp-content/uploads/civicrm/ext/
    [extensionsURL] => <my-url>/wp-content/uploads/civicrm/ext/
    [uploadDir] => <my-website>/public_html/wp-content/uploads/civicrm/upload/
)

[26-Oct-2020 16:32:28 UTC] Array
(
    [extensionsDir] => <my-website>/public_html/wp-content/uploads/civicrm/ext/
    [extensionsURL] => <my-url>/wp-content/uploads/civicrm/ext/
    [uploadDir] => <my-website>/public_html/wp-content/uploads/civicrm/upload/
)

Edit 2

I see this error message in the admin area of CiviCRM.

Extension download error
------------------------
The CiviCRM public extensions directory at could not be contacted - please check your webserver can make external HTTP requests or contact CiviCRM team on CiviCRM forum.

Not sure about the directory at could not feels like there should be something after the at and before could.

  • I've been having challenges with 5.30.1 as well, though with Drupal 8. It'd be nice to hear which code might be responsible for the changes since the previous version. civicrm.stackexchange.com/questions/37994/… – Alan Dixon Oct 27 '20 at 17:25
  • @AlanDixon I was able to solve the issue by settings the file paths in the settings file explicitly. What was most confusing about the issue was that I have not changed the paths (only set them). It seemed like CiviCRM was not setting the paths early enough for some functions. For example: global $civicrm_paths; $civicrm_paths['civicrm.files'] = array( 'url' => '<My site addres>/wp-content/uploads/civicrm/', 'path' => '<My site path>/public_html/wp-content/uploads/civicrm/', ); – C Lee Nov 6 '20 at 11:26
  • I could have sworn I wrote an answer here, I even remember referemcing other questions that helped me solve this, apologies. – C Lee Nov 6 '20 at 11:28
  • This is not an answer, but maybe another interpretation will help: when System.php requests $config->uploadDir (etc), it should be handled by the "magic" method CRM_Core_Config_MagicMerge::__get($k). It's categorically inappropriate for it to say PHP Notice: Undefined property when using a magic-method. It sounds to me like either (1) $config is not the object we expect it to be (__get() is not being use), or (2) there's something funny going on within __get(). – Tim Otten Dec 2 '20 at 3:24
  • You might also double-check the PHP version -- some versions might have a bug like bugs.php.net/bug.php?id=74340 ? – Tim Otten Dec 2 '20 at 3:31
0

I am getting this similar message right on our landing page and on every page from the Wordpress backend. Also, CiviCRM does not load the menus and the menu restore command does nothing. So at the moment, our administrative assistant cannot access the membership records, but it seems that our donation forms still load and can be submitted in spite of these messages displayed.

Notice: Undefined property: CRM_Core_Config::$uploadDir in /home/gcmfor5/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 87

Notice: Undefined property: CRM_Core_Config::$uploadDir in /home/gcmfor5/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 87

I am unclear though on the exact syntax and which specific file to update to resolve this and ANY clarity offered would be VERY MUCH appreciated.

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.