Update field names in serializeVisibleElements to use producer & consumer names#7317
Open
ciaens wants to merge 1 commit intoLibreSign:mainfrom
Open
Update field names in serializeVisibleElements to use producer & consumer names#7317ciaens wants to merge 1 commit intoLibreSign:mainfrom
ciaens wants to merge 1 commit intoLibreSign:mainfrom
Conversation
consumer names. Fixes: LibreSign#7316
5780614 to
420ef45
Compare
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.
Resolves: #7316
EDIT: only tested on stable32
📝 Summary
In src/store/files.js:868-875, the serializeVisibleElements() function was mapping coordinate fields to the wrong names: x, y, w, h instead of the correct page, top, left, width, height.
The buildVisibleElements() function in VisibleElements.vue creates coordinates with { page, width, height, left, top }, matching what the backend's FileElementService::translateCoordinatesToInternalNotation() expects. But serializeVisibleElements() was looking for x/y/w/h properties that don't exist, so the API received undefined values for all coordinates. This caused the signature position to silently fail to save & no error because the request structure was valid, but the coordinates were empty.
🧪 How to test
✅ Checklist