[2.11.x] Fix 500 error when change default visibility #3605
No reviewers
Labels
No labels
BE Request
Backlog
Better behavior
Blocked by deps
Bug
Code Review
Discussion
Doing
Feature Request / Enhancement
In the shining bright future maybe
It's complicated
MS Edge
Mememoon (or other niche browsers)
Missing API
Missing feature
Missing l10n/i18n
NL1
NL2
NL4
Need to verify on develop
RELEASE BLOCKER
Reassign or Close
Refactor
Regression
Safari
To Do
User story
Waiting on godot
accessibility
better documentation
chore
confirmed
easy ticket
incident
l10n update
mastoapi
mobile
needs design
needs-info
needs-review
stupid
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
pleroma/pleroma-fe!3605
Loading…
Reference in a new issue
No description provided.
Delete branch "mei/pleroma-fe:fix/profile-config-json-2.11.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi. I am running small Pleroma instance (2.11.1, bundled FE 2.11.4).
When I change default post visibility in Settings → Composing, it always fails.
PATCH /api/v1/accounts/update_credentialsreturns 500 error and the setting goes back to old value.I checked the code.
defaultApiinprofileConfig.jsmakes params like{ source: { privacy: ... } }and send it withupdateProfile, butupdateProfileuses FormData. FormData changes the nested object to string[object Object], so backend receivessource=[object Object]and crash:Also browser console shows warning "Object detected in updateProfile API call...".
In develop this is already fixed by
316bf4c226(it usesupdateProfileJSON). But this fix is part of big vuex removal / Pinia migration (#3571), so I think it is not in 2.11.x. This PR is only same change for 2.11.x.updateProfileJSONis already exist insrc/api/user.jsand return value is same shape, so I didn't change other part.Notes:
source.sensitive) also use same path, so the request is fixed too. But backend still ignore this field (pleroma/pleroma#2837).locked,discoverableetc.) are also sent as JSON now. It is same as develop.If possible, please include this in 2.11.5.
Thank you! (and sorry for my English)