3

I have upgraded to CiviCRM 5.34 and things seem to have gone astray. When loading the extensions page (Administer -> Systems Settings -> Extensions) the following error message is displayed:

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.

I cannot refresh the extensions list, not install any new extensions (I guess since the catalogue cannot be reached). I fired up a terminal into the server and Curl seems to work, and I cannot see any PHP options which may prevent connections.

Any help here?

1 Answer 1

2

Looking at CRM/Extension/Browser.php where that error is generated, I would expect it to show a URL between the at and could in your message. So Civi isn't calculating the repository URL.

Tracing the code a bit, it seems that the URL should be calculated in CRM_Extension_System::getRepositoryUrl(), which pulls it from the ext_repo_url setting.

Here's what I would try, in order:

  • Clear the CiviCRM cache, that's probably the issue anyway.
  • Confirm that <civiroot>/settings/Extension.setting.php defines ext_repo_url with the default value of https://civicrm.org/extdir/ver={ver}|cms={uf}.
  • Check the civicrm_setting table for a record with a name of ext_repo_url. If one exists, this is overriding the default; remove it.
  • Alternatively, add a setting (via API Explorer, or in civicrm.settings.php - see Override settings in the docs) to set ext_repo_url to https://civicrm.org/extdir/ver={ver}|cms={uf}. This should force the correct URL to be generated.
3
  • 1
    Thank you so much. You're a life saver.
    – Andrew
    Feb 17, 2021 at 1:03
  • 1
    I ended up updating the setting file, which fixed the issue for now. There is clearly something else going on, so more investigation is required on my part. Will report back if I find anything.
    – Andrew
    Feb 17, 2021 at 1:04
  • 1
    Update: Turns out most of my weirdness was coming from strange CIVICRM_TEMPLATE_COMPILEDIR behaviour. I did not have a specific directory specified in the setting file, so a replica civicrm directory structure was being created with ONLY the templates_c directory being filled with files (the remainder of the files including extensions were located in another directory). I manually specified a location in the setting file and all the weird messages and unstable behaviour disappeared. Hope this helps someone.
    – Andrew
    Feb 18, 2021 at 3:19

Your Answer

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

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