4

On our CiviCRM deployment, running 4.7.23, it says System Status: Error in the footer. When clicking the System Status: Error link, I get a blank page with the following console errors (url redacted):

GET https://<redacted_base_url>/[civicrm.files]persist/contribute/dyn/angular-modules.2513685c7e9bf04c4c187f640cffc720.js 

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.11/$injector/modulerr?p0=crmApp&p1=Error%3A%20%5B%24injector%3Anomod%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.5.11%2F%24injector%2Fnomod%3Fp0%3DcrmApp%0A%20%20%20%20at%20https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A6%3A426%0A%20%20%20%20at%20https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A25%3A235%0A%20%20%20%20at%20b%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A24%3A282)%0A%20%20%20%20at%20https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A25%3A20%0A%20%20%20%20at%20https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A40%3A17%0A%20%20%20%20at%20q%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A7%3A371)%0A%20%20%20%20at%20g%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A39%3A382)%0A%20%20%20%20at%20fb%20(https%3A%2F%2<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A43%3A381)%0A%20%20%20%20at%20c%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A21%3A19)%0A%20%20%20%20at%20Gc%20(https%3A%2F%2F<redacted>%2Fsites%2Fall%2Fmodules%2Fcivicrm%2Fbower_components%2Fangular%2Fangular.min.js%3Fovlk9u%3A21%3A332)
at angular.js:38
at angular.js:4692
at q (angular.js:325)
at g (angular.js:4653)
at fb (angular.js:4575)
at c (angular.js:1809)
at Gc (angular.js:1830)
at se (angular.js:1715)
at HTMLDocument.<anonymous> (angular.js:32616)
at i (jquery.min.js?ovlk9u:2)

```

My [civicrm.files] variable seems correct:

[civicrm.files] /var/www/html/drupal/sites/default/files/civicrm

The contents of /var/www/html/drupal/sites/default/files/civicrm are:

# pwd
/var/www/html/drupal/sites/default/files

# ls -la civicrm/
total 44
drwxr--r--  8 www-data www-data  4096 helmi  5  2016 .
drwxrwxrwx 26 www-data www-data  4096 kesä   8 03:38 ..
drwxr-----  2 www-data www-data  4096 syys   1 04:14 ConfigAndLog
drwxr--r--  2 www-data www-data  4096 syys   6 04:27 custom
drwxr--r--  3 www-data www-data  4096 syys   6 04:27 ext
drwxr--r--  3 www-data www-data  4096 joulu 21  2016 persist
drwxr--r--  3 www-data www-data  4096 syys   6 04:24 templates_c
drwxr--r--  3 www-data www-data 16384 syys   6 04:27 upload

How should I configure the [civicrm.files], so that it can serve the Bower components properly?

1 Answer 1

2

I just fixed this issue on a site I was working on. Hopefully it helps you as well. My issue was directory permissions. You need to make sure that all of your directories have permissions set to 755. My contribute folder was set to 750, which did not allow the directory structure to be loaded beyond that point. Because of that, it's not able to load the angular-modules.2513685c7e9bf04c4c187f640cffc720.js file.

An easy way to do this is to use FileZilla and navigate to somewhere you know is ok, maybe your /var/www/html/drupal/sites/default/ directory. Then you can right-click on the files folder and choose File Attributes or File Permissions depending on which pane you use, and make sure permissions are set to 755. Now choose Recurese into subdirectories and MAKE SURE you select Apply to directories only, you don't want to apply it to files. Click OK and once it completes, try going to your system status page again and hopefully it works now!

enter image description here

3
  • See also (for command line permissions changes): civicrm.stackexchange.com/a/22940/26
    – Laryn
    Commented Apr 11, 2018 at 18:11
  • I had this issue, but for a different reason - i had changed the site hostname previously, but some .js files served from the old domain, triggering a CORS error, due to missing Access-Control-Allow-Origin: header. After fixing that, i could view the screens. Commented Apr 27, 2018 at 19:32
  • Or just edit CIVICRM_UF_BASEURL in civicrm.settings.php Commented Apr 27, 2018 at 19:46

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.