-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When collage.allow_selection is disabled, text_alignment in a layout JSON is not applied. The text stays at the admin default position instead of the JSON-defined zone.
Actual behavior:
text_alignment is ignored unless collage.allow_selection = true.
Steps to reproduce the behavior
- Disable “Allow collage selection” in the admin UI (
collage.allow_selection = false) - Use a layout JSON that contains a
text_alignmentblock - Create a collage
Expected behavior
text_alignment from the layout JSON should still be applied as long as text-on-collage is enabled.
Photobooth Version
4.99
Browser and browser version
No response
Operating System
No response
Did it work before?
Yes
Latest working version
idk
Additional context
Proposed Fix:
Apply text_alignment whenever text-on-collage is enabled, independent of collage.allow_selection.
Keep text_disabled optionally tied to allow_selection if you want to preserve current behavior.
Line 275 Collage.php
- if ($c->collageAllowSelection) {
- // JSON layout can only disable or customize text if admin has enabled it
- if ($adminTextOnCollageEnabled === 'enabled') {
- if (isset($collageJson['text_disabled']) && $collageJson['text_disabled'] === true) {
- $c->textOnCollageEnabled = 'disabled';
- } elseif (isset($collageJson['text_alignment']) && is_array($collageJson['text_alignment'])) {
- $ta = $collageJson['text_alignment'];
- $c->textOnCollageEnabled = 'enabled';
+ // JSON layout can only disable or customize text if admin has enabled it
+ if ($adminTextOnCollageEnabled === 'enabled') {
+ if ($c->collageAllowSelection && isset($collageJson['text_disabled']) && $collageJson['text_disabled'] === true) {
+ $c->textOnCollageEnabled = 'disabled';
+ } elseif (isset($collageJson['text_alignment']) && is_array($collageJson['text_alignment'])) {
+ $ta = $collageJson['text_alignment'];
+ $c->textOnCollageEnabled = 'enabled';
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working