Repository navigation
fix: render saved block background colors in Smarty (#318) - #387
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #318
Reproduction on current main
Base:
70ae639964a3b1fcf945567a80eb7d1c73a425b1(module 3.2.5).displayHome.#c62828, then reload the PrettyBlocks editor and open the front office.$block.styles.Reproduced via the actual BO on PrestaShop 8.2.7 / PHP 8.1.33 and 9.1.4 / PHP 8.5.0. Thanks to @Nathhhhhh for the report and @bc-devle for identifying the missing template style.
Minimal fix
$block.stylescontract; no changes to field resolution, templates, schema, hooks, stored settings or default values.nofilter.An initial quoted-attribute prototype was rejected by real Smarty/browser testing; it is not this patch.
Regression tests
Exact ZIP and functional matrix
Local candidate:
prettyblocks-3.2.5.zip, SHA-256c81494980d0d18b45db5ffd5758087173cb53aa83efa9662345c0c6ed642eb4e.A local Docker registry-resolution failure prevented a fresh standard build. Because no Composer/Vite input changed, this candidate explicitly reuses the audited current-main ZIP payload and replaces only the two changed PHP/plain-JS files. This is a documented repack, not a claimed fresh build. Independent archive audit confirms 217 other files unchanged, root
prettyblocks/, manifest and every referenced asset present, identical modes, no dev/test payload. GitHub must independently rebuild and install its own artifact before this PR is announced ready.That exact candidate passed the repository install/smoke/PHP-lint/SCSS/dependency/asset checks on fresh PS8.2.7/PHP8.1 and PS9.1.4/PHP8.5 shops. Initialization was sequential to avoid local memory pressure; the initial simultaneous attempt was killed and is not counted as a pass.
Additional actual Smarty + Chromium tests on both versions:
renderZone → BlockPresenter → zone.tpl → built-in .tploutput: uncolored HTML 844 bytes, byte-for-byte identical before/after;Scope and limits
GitHub validation completed
All runs passed for head
802ce5ef7cd031898a1e359b526864d1482763f7:70ae639, tested mergeb96c286.The standard GitHub ZIP has SHA-256
1a7213870a11ad2413ad5f4be2e504c0f6d164c4abe5dfbe2f04868dcb45290c. Independent exhaustive comparison confirms its payload, all paths and modes match the locally functionally tested candidate exactly; only ZIP ordering/timestamps/extra fields differ. Shared canonical digest:cca5a8c04fc8c1af19ede8efc628095c98a4550e6ac41667e0fb01d73d6b5707.Ready for Guillaume's human review, not automatically approved or merged. The builder/harness additions also require manual infrastructure review.