Problem/Motivation

Found by @jibran in #1959806-56: Provide a generic 'entity_autocomplete' Form API element. Copying over the steps to reproduce from there:

  1. Create a node with new tags. (ER auto tag widget)
  2. Edit the node. (This shows correct default values)
  3. Replace the default values of ER field with new tag.
  4. Preview the node.
  5. Come back to edit form
  6. Now default value is new tag with no id( which is correct)
  7. View the node. See I didn't save the node.
  8. I can see the tags added in 1.
  9. Edit the node.
  10. I should see 2. Instead I see 6.(This is the bug.)

Proposed resolution

Delete the stale temp store entry for existing entities.

Remaining tasks

None.

User interface changes

Nope.

API changes

Nope.

CommentFileSizeAuthor
#1 2421581.patch1.86 KBamateescu
#1 2421581-test-only.patch1.29 KBamateescu

Comments

amateescu’s picture

Status: Active » Needs review
StatusFileSize
new1.29 KB
new1.86 KB

Simple bug, simple fix.

The last submitted patch, 1: 2421581-test-only.patch, failed testing.

andypost’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#2421263: Potential data loss: concurrent (i.e. by different users) node edits leak through preview
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 8c0f934 on 8.0.x
    Issue #2421581 by amateescu: Node preview causes stale values to be kept...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.