Menubar css failing to generate with debugging enabled on staging site
I have several CiviCRM instances running on a single server. They are all set up as staging environments.
All systems are running on:
- Ubuntu 16.04
- Drupal 7.66
- CiviCRM 5.13.1
- php7.2
All system had their environment set to staging $civicrm_setting['domain']['environment'] = 'Staging';
inside the civicrm.settings.php
file.
Upon upgrading from 5.12 to 5.13.1 we encountered an issue with the dynamically generated crm-menubar.css
stylesheet. Two of the five sites on our server were not generating this file and instead, the following truncated URL was being attached to the page:
@import url("https://staging.sitename.org/index.php?pr4crf");
Comparing with the other three working sites the import should have been of the form:
@import url("https://dmaster.demo.civicrm.org/sites/default/files/civicrm/persist/contribute/dyn/crm-menubar.e90e0a297b223ee5d9ec64abe1b000c1.css?pr4crf");
As a result of this CSS file not being loaded, the main navigation bar appeared completely unstyled at the bottom of all pages.
Directory permissions and Resource URLs were identical across all servers. All caches - Drupal and CiviCRM - were cleared and the contents of template_c/ manually deleted several times.
Further investigation found the working sites had the Enable Debugging setting set to off. Enabling debugging immediately caused the same truncated error on the unaffected servers and turning it off fixed the issue.
In the case of some sites, the Asset Caching feature had to also be set to Disable and then back to auto along with clearing CiviCRM Caches and Resetting all paths before the change would take effect.