Skip to content

Fix Carbon Fields attribute error: remove invalid class attribute from byte_size field#12

Merged
daimpad merged 2 commits intomainfrom
claude/evaluate-change-requests-FEyiS
May 6, 2026
Merged

Fix Carbon Fields attribute error: remove invalid class attribute from byte_size field#12
daimpad merged 2 commits intomainfrom
claude/evaluate-change-requests-FEyiS

Conversation

@daimpad
Copy link
Copy Markdown
Owner

@daimpad daimpad commented May 6, 2026

Summary

  • Removes ->set_attribute('class', 'odw-byte-size-backing') from the byte_size backing field in class-fields.php
  • Carbon Fields 5 only permits data-* and a specific set of HTML attributes (list, max, maxLength, min, pattern, placeholder, readOnly, step, type, is, inputmode, autocomplete) on its React-controlled inputs — class is not allowed and triggers the "site seems slightly misconfigured" admin error
  • Updates admin.css to use [data-odw-backing] as the CSS selector (was .odw-byte-size-backing) — the data-odw-backing attribute was already present on the field

Test plan

  • Admin notice "Your site seems to be slightly misconfigured" no longer appears
  • File size backing field is still hidden in the distribution form
  • JS byte-size widget still syncs value to the hidden backing field

https://claude.ai/code/session_FEyiS


Generated by Claude Code

claude added 2 commits May 6, 2026 10:48
…ize field

CF5 only allows data-* and a specific set of HTML attributes on its React
inputs. Replace .odw-byte-size-backing CSS class (disallowed) with the
existing [data-odw-backing] data attribute as the hide target.

https://claude.ai/code/session_FEyiS
- Delete stale planning docs (docs/WEBHOOK_IMPLEMENTATION.md,
  docs/I18N_IMPLEMENTATION.md) — unimplemented, no longer relevant
- Bump plugin version to 2.1.0
- README: rewrite to reflect current architecture (per-distribution
  license, 4 quality levels, new tab structure, CESSDA, composite file
  size widget, shortcode overhaul, updated file tree)
- CHANGELOG: close v2.0.0 entry, add v2.1.0 and v2.1.1 entries
- CLAUDE.md: update version constant, test count (90), quality levels
  (4), version/feature matrix, test file list

https://claude.ai/code/session_FEyiS
@daimpad daimpad merged commit 248cb9f into main May 6, 2026
10 checks passed
@daimpad daimpad deleted the claude/evaluate-change-requests-FEyiS branch May 6, 2026 10:59
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