0

I activated aggregate CSS on my local development and on a remote testing environment without any problems. Now on staging the aggregation of CSS files causes trouble: on some pages the styling looks correct but on random pages it is completely broken. The HTML sometimes shows:

<link rel="stylesheet" href="/?p0upgh" media="all" />
<link rel="stylesheet" href="/?p0upgh" media="all" />
<link rel="stylesheet" href="/?p0upgh" media="print" />

Sometimes some of the aggregated files seems not to be inserted via HTML meaning: there are no Tags or just one - some of the stylesheets are missing.

I checked folder permissions: sites/default/files and sites/default/files/css have 777 as chmod values. The owner and the group of the folders and files belong to the correct folder and CSS are aggregated in sites/default/files/css.

Does anyone has some hint for me what my cause this problem?

1 Answer 1

0

The issue was connected to this: https://www.drupal.org/project/paragraphs/issues/2914259

I am not quite sure what exactly was the problem but when I went to the status report page I realized the error message

Entity/field definitions
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Paragraph

- The Published field needs to be updated.

I implemented the update function

_update_function() {
  try {
    $entityUpdateManager = \Drupal::service('entity.definition_update_manager');
    $entityUpdateManager->applyUpdates();
  }
  catch (EntityStorageException $e) {
    print_r($e);
  }
}

run update and the problems with the aggregated css disappeared.

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.