Skip to content

Add maxlength to 255 on font selectors. Fixes: #821 - #822

Merged
jjroelofs merged 1 commit into
8.xfrom
Drale1/8.x/#821-Fix-theme-settings-save-failure-headings-CSS-selector-exceeds-Drupal-textfield-maxlength-(128)
Jul 29, 2026
Merged

Add maxlength to 255 on font selectors. Fixes: #821#822
jjroelofs merged 1 commit into
8.xfrom
Drale1/8.x/#821-Fix-theme-settings-save-failure-headings-CSS-selector-exceeds-Drupal-textfield-maxlength-(128)

Conversation

@drale1

@drale1 drale1 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Linked issues

Solution

Drupal core textfields default to #maxlength 128. DXPR Theme's default headings_font_face_selector value is 139 characters, so saving theme settings fails with:

CSS Selector cannot be longer than 128 characters but is currently 139 characters long.
This can happen even when changing unrelated settings (for example color palette values), because the entire theme settings form is validated on submit.
Set #maxlength to 255 on all five *_font_face_selector fields in features/sooper-fonts/fonts-theme-settings.inc so default and custom font CSS selectors can be saved without validation errors.

Checklist

  • I have read the CONTRIBUTING.md document.
  • My commit messages follow the contributing standards and style of this project.
  • My code follows the coding standards and style of this project.
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Need to run update.php after code changes
  • Requires a change to end-user documentation.
  • Requires a change to developer documentation.
  • Requires a change to QA tests.
  • Requires a new QA test.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@drale1
drale1 requested a review from jjroelofs June 8, 2026 06:20
@drale1

drale1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

@jjroelofs
Heads up: the same fix is now in Drupal.org MR !5 (#3593878). I compared the diffs — they are identical.

Happy to close this PR once MR !5 is merged, to keep a single source of truth on Drupal.org.

@jjroelofs
jjroelofs merged commit e6497d7 into 8.x Jul 29, 2026
5 checks passed
@jjroelofs
jjroelofs deleted the Drale1/8.x/#821-Fix-theme-settings-save-failure-headings-CSS-selector-exceeds-Drupal-textfield-maxlength-(128) branch July 29, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants