Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/inline editing provisional drafts #15962

Merged
merged 4 commits into from
Nov 5, 2024

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Oct 25, 2024

Description

Replication steps:

  • create a section with an entry type that has a required plain text field
  • add an entry to it, fill out the plain text field and save
  • now edit that entry again, change the title, let it auto-save and leave it in a provisional draft state
  • go to the index page for the section (in a table view) and click “Edit” to activate inline editing
  • remove the copy from the plain text field and try to save
  • a generic “Server error occurred” is displayed

Solution:
When getting the edited entries by their IDs, get the provisional drafts, too. When composing an array of errors to be passed back to JS, index the errors by canonical ID (as that’s what’s used in the data-id attribute for element rows).

Note: when inline editing a provisional draft, the changes will be applied to the provisional draft, not the canonical element.

Related issues

n/a (found by Luke)

@brandonkelly brandonkelly merged commit cdd1cbc into 5.x Nov 5, 2024
@brandonkelly brandonkelly deleted the bugfix/inline-editing-provisional-drafts branch November 5, 2024 04:47
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.

2 participants