2

I've got the problem, that after an upgrade to the newest CiviCRM version (4.7.23) on WordPress, I can only create a new mass mailing when debug mode is enabled. When it is disabled, CiviCRM gives me an empty page after clicking on new mailing. It does not even say "Initializing...". However, the menu still works fine (doesn't freeze or so).

I've checked the resource URL and the directories, they are correct (I would say). Although I had to leave the Custom PHP Directory field empty, because I simply don't know what to put in there.

The JavaScript console gives me nine errors if I'm not in debug mode:

What might be pointing to the problem here is, that CiviCRM is located at 'netzwerk-n.org/crm' not 'netzwerk-n.org'. But as I said, the directories in the setting.php and also in CiviCRM itself look correct to me (they refer to 'netzwerk-n.org/crm').

I've also checked my permissions, but I'm an admin so there shouldn't be problems, I guess.

When I enable debugging, I can write new mails. However, in debug mode, CiviCRM doesn't seem to actually send/deliver mails. So it's of no use to me.

I'd love to here some of your ideas on that topic.

Best regards Jannis

[Edit: Just recognized, that also the system status page does not load when debugging is disabled.]

3
  1. Cross-origin refers to accessing resources on a different domain. It's curious that URLs you reference are actually different domains -- www.netzwerk-n.org vs netzwerk-n.org. You might want to check which of those appear in (a) the URL bar (b) the Resource URLs (esp under "?" help button) and (c) the outputted HTML documents.

  2. As an alternative to "Debug" mode, you might try toggling disabling the "Asset Cache" mode. It's on the same screen: Administer => System Settings => Debugging, but it has fewer side-effects.

  • Dear Tim, thanks for pointing to the differences in the URLs I'm using! Why didn't I see that earlier!? ;) But correcting it for the resource URLs didn't solve the problem. And in the Asset Cache mode, the mail tool doesn't load as well – Jannis Eicker Sep 4 '17 at 15:12
  • 1
    @JannisEicker check your BASE_URL in civicrm.setttings.php. Also check to make sure you're not rewriting the URL in your web server configuration? – Jon G - Megaphone Tech Sep 4 '17 at 15:36
  • Dear @JonG, thanks for your comment! I've checked the BASEURL and it says netzwerk-n.org/crm which is correct. For other reasons (the icons for 'print' and so on wouldn't show), I had to add global $civicrm_paths; $civicrm_paths['civicrm.files'] = array( 'url' => 'http://netzwerk-n.org/crm/wp-content/uploads/civicrm/' ); into the settings.php as well. But that shouldn't interfere, I guess. In the UI, I wouldn't even know where to change the base URL and all the resource URLs as well as the directories are global now: I'm using [civicrm.root] and [civicrm.files]. – Jannis Eicker Sep 4 '17 at 16:03
  • (a) Completely agree it's best to fix issue in the path-settings. (b) My suggestion to "toggle" asset-caching was a bit ambiguous -- should have said "disable". The reason debug mode works (despite path issues) is that it also (generally) disables asset caching. – Tim Otten Sep 5 '17 at 16:15
1

At some point I recognized that it's not only the new mailing page that doesn't load when I disable debugging, but also the system status page wouldn't. So I thought, both things might have something in common. And it turned out, that they do, as they both angular pages (I don't really know what that means, but well that seems to connect them). With that knowledge I knew what I had to search for and I found another post that solved the problem: https://civicrm.stackexchange.com/a/19373/4484

To put it in my own words: If you've got the same problem, you've got to make sure that the path for uploading pictures is the same as the one CiviCRM will look for pictures. The solution to my problem was to replace the former with the path of the latter (in my case: [civicrm.files]/persist/contribute/).

  • 1
    interesting - so it was your reference to this working when debugging was 'on' that threw me and probably others to pointing to the other ticket – petednz - fuzion Sep 6 '17 at 21:02

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.