Skip to content

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

Open
drale1 wants to merge 1 commit into
8.xfrom
Drale1/8.x/#821-Fix-theme-settings-save-failure-headings-CSS-selector-exceeds-Drupal-textfield-maxlength-(128)
Open

Add maxlength to 255 on font selectors. Fixes: #821#822
drale1 wants to merge 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
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.

1 participant