6

I've just upgraded a test site from 4.7.15 to 4.7.21 on Drupal before going live. The System Status page isn't showing as expected and the console has this log:

GET failed for ..../sites/mysite/files/civicrm/persist/contribute/dyn/angular-modules.33b51763aa1098ba_etc_etc.js

This file doesn't exist. Note the Drupal site is not in sites/default/ but I have set the Civi Resource URLs correctly (hopefully) and cleared the Drupal and Civi caches. Any suggestions?

I've previously (and now) done some messy tweaking of $filesURL in CRM_Utils_System_Base to cope with not being in "default".

TIA Chris

  • Me too. Same error in console. Only difference is mine's deployed on WordPress. And I need to fix a missing indices error, but can't use the Update button because System Status won't populate. – Prónay Jul 7 '17 at 18:36
  • And me withCiviCRM 4.7.22, WordPress 4.8.Main site fine, but cloned a training site shows something similar. Apart from having to fiddle CiviCRM Resource URL to get the menus to display everything was straight forward. Now everything seems to be working except that the detail of the system status isn't displaying.Looks as if it may be the same as this, but I don't understand the solution. Would welcome simple steps to put this right. – Mick Kahn Jul 18 '17 at 16:26
  • 2
    I'm not a WordPress user... The trick is to get the Image Upload URL at System Settings - Resource URLs to match the Image Directory at System Settings - Upload Directories You will want to get the bit at the end to match eg both typically ending on Drupal with /files/ – chriscant Jul 18 '17 at 20:05
  • I've done all the above and still face the same issue in 4.7.22. – Osvaldo Gómez Jul 20 '17 at 19:41
14

We had one site that had 'lost' all it angular pages, eg CiviMail and System Status.

In our case the angular cache files were returning 404 on the New Mailing page. (and 'inspector' was showing a lot of red angular errors)

It was building the cache files in sites/default/files/civicrm/images, but then searching for them in sites/default/files/civicrm/persist/contribute

The issue here was a mismatch between the resource url setting for Image Upload URL and the directory setting for Image Directory. Strangely (!!) these folders are being used for caching of angular files.

  • Thanks Peter - I'll double check those settings. I was wondering if any other functionality would go awol. – chriscant Jul 7 '17 at 19:33
  • 2
    go on. give me a +1 ;-) – petednz - fuzion Jul 7 '17 at 21:57
  • 1
    Unfortunately this didn't fix the issue for me. WordPress 4.8, Civi 4.7.22. It affects not just the status page, but also other pages that depend on angular. The Image Upload URL and the Image Directory match: both are [civicrm.files]/persist/contribute/. The browser is getting a 404 when trying to access my.site/wp-content/uploads/civicrm/persist/contribute/dyn/…, even though the file exists on the server. I cleared Civi's cache several times, logged out and back in. Still no luck. – Noah Miller Jul 19 '17 at 6:21
  • did you see chriscant's comment on the original Q re WP? – petednz - fuzion Jul 19 '17 at 9:40
  • Yes. Perhaps I'm not understanding it? I made sure that the Image Upload URL and the Image Directory match, including "the bit at the end" ;) But this didn't solve the problem. – Noah Miller Jul 20 '17 at 4:34
8

I was able to solve this, at least for now, on my WordPress 4.8/Civi 4.7.22 site using this suggestion from Tim Otten:

another work-around should be going to "Administer => System Settings => Debugging" and disabling the "Asset Cache"

Of course in the long term we'd like to take advantage of the Asset Cache. But for now at least we have our angular-based screens back.

  • 1
    Civi insists that my image directory & resource URL mismatch - but they don't appear to! So this disabling of the Asset Cache was my 'fix' although doesn't exactly give me a warm feeling. Can now see the status screen and civimail is working again. I look forward to some better code here - this seems to have been a big problem for many users – Andy Clark Aug 16 '17 at 17:46
2

I had this issue as well and tried all the suggestions above to no avail.

Eventually, I found that because I had redirected my site to www.mysite.com instead of mysite.com I was getting this error:

"No 'Access-Control-Allow-Origin' header is present on the requested resource."

I updated the resource URLs to absolute paths with: https://www.mysite.comsites/default/files/civicrm/persist/contribute

That update fixed the issue for me.

0

I just experienced this and found it was a permissions issue - my website user didn't have write access to the persist/contribute directory.

I followed Noah's advice above to disable the Asset Cache, and when I visited the System Status page (Administer menu » Administration Console » System Status), it reported the permission issue.

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.