Change backgroundcolor and save results in an error

The DXPR modification is causing an error: The CSS selector cannot be longer than 128 characters, but it is currently 139 characters long.

Change a colorsetting

In: /admin/appearance/settings/dxpr_theme change Primary Text to ffff00 and hit: [Save]

I use Dutch language. It's the only language I use. It's a Dutch site.

Proposed resolution

Use abbreviations?

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork dxpr_theme-3593878

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

purefoxy created an issue. See original summary.

drale01’s picture

I was able to reproduce this issue on Drupal 11 with DXPR Theme 8.1.2.

**Root cause:** Drupal textfields default to `#maxlength` 128, while the default `headings_font_face_selector` value is 139 characters. Saving theme settings (including unrelated color changes) fails form validation.

**Fix:** Set `#maxlength` to 255 on all `*_font_face_selector` fields in `features/sooper-fonts/fonts-theme-settings.inc`.

A pull request is open and under review. Once it passes review and CI, the fix should be included in the next release.

purefoxy’s picture

I've implemented the fix. Thanks for the reply.
Just waiting for the final solution.

priyansu18’s picture

Assigned: Unassigned » priyansu18

Working on it.

priyansu18’s picture

Assigned: priyansu18 » Unassigned
Status: Active » Needs review

I have added #maxlength 255 to all of the '_font_face_selector' fields in the MR. Thanks.

drale01’s picture

Thanks @priyansu18 for MR !5.

I compared MR !5 with the GitHub PR https://github.com/dxpr/dxpr_theme/pull/822 — the patch is identical to the approach described in comment #2. I'll coordinate with our team to close the GitHub PR so maintainers only need to review the Drupal.org MR.

+1 for MR !5.