PHP

Drupal Custom Entities with Bundle Classes

One thing that always felt missing from Drupal 8 was the ability to define bundles in custom entities via classes. It seemed like a natural extension of custom entities and would help with better code organization, especially when specific operations needed to be performed when saving a custom entity of certain bundles. Instead, we were left with configuration of bundles, which was fine but always felt hacky to me. This changed with very little fanfare with the release of Drupal 9.3.

Resolving Drupal Data Compression (or PHP Served Data) Corruption Issues

This problem's main symptoms involve browsers complaining that "[[they]] Can't Open the Page (cannot decode raw data)" (Safari), "[[there is a]] Content Encoding Error (invalid or unsupported form of compression)" (FireFox), or "[[they]] can't reach this page (INET_E_DATA_NOT_AVAILABLE)" (Internet Explorer and Edge). This problem is typically due to an error in the compressed data stream output by Drupal 7 when the setting "Compress cached pages." is selected in the Performance section of the website settings and a version of the current page has not been cached.

Subscribe to PHP