Fixing Disappearing Placeholders in Drupal 10.2: James Williams Insights
James Williams' blog post on Computer Minds, titled "My text filter's placeholder content disappeared! A story of contributing a fix to Drupal... and a pragmatic workaround," details the discovery and resolution of a bug encountered when upgrading a site from Drupal 10.1 to 10.2. The bug caused the site's login form to vanish, which was critical since all content was hidden behind a login.
The issue arose from a custom text format filter plugin that used placeholders for the login form. A core filter, "Correct faulty and chopped off HTML," inadvertently removed these placeholders.
Debugging led to the realization that the placeholder attribute was being converted incorrectly due to Drupal’s new HTML5 processing component. James identified a quick workaround by passing a non-empty argument to prevent the attribute from being converted. He also contributed a more permanent fix to Drupal core despite the complexities and challenges often associated with the contribution process.
This experience highlights the perseverance needed in open-source contributions and suggests potential improvements to streamline the process for developers.