Skip to content

fix: optional highlight fields, blocks without image or call to action - #25

Merged
anoziere merged 6 commits into
mainfrom
fix/optional-fields-t3
Oct 18, 2026
Merged

anoziere merged 6 commits into
mainfrom
fix/optional-fields-t3

Conversation

@anoziere

Copy link
Copy Markdown
Contributor

Takes over #16 by @pierrebaguet, rebased on the Thelia 3 code: its two commits are kept as they are (category and fields optional, "Choose a category" entry).

Making those fields optional exposed two failures, fixed here:

  • A block saved without an image failed: a new image row was attached to the block and saved with it, and its file column is required. The image is now attached only when a file is uploaded, so no empty image row is written. No schema change.
  • A block saved without a call to action broke every storefront page: the template passed a null text to the theme's button component, which types it as a string. Each button is now rendered only when its text is set.

Also: the image model is declared with a consistent constructor, which clears the only PHPStan error of the module.

Version 2.1.3. #23 (shared cache) is untouched and still waits for the next core release.

@anoziere anoziere mentioned this pull request Oct 18, 2026
@anoziere
anoziere merged commit 0cc11d6 into main Oct 18, 2026
5 checks passed
@anoziere
anoziere deleted the fix/optional-fields-t3 branch October 18, 2026 09:38
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