Image lost after node preview without JS

Created on 16 December 2016, over 8 years ago
Updated 20 March 2025, about 2 months ago

Problem/Motivation

Follow-up of #2548713: Only one additional new value saved unlimited field and no non-field values are restored after preview

Argh, I did find one regression here, actually identifed by a paragraph test that I didn't run when working on this (ParagraphsAccessTest) but took me a while to track it down.

Given the following:

* An Image field (probably file as well), does not need to be on paragraph/nested form, the one on article works to reproduce this
* JS disabled
* alt/title not required

When you select a file, and then directly go to Preview, without clicking "Upload" first, and then go back to content edit then the image field is in a weird, messed up state. Somehow I think we get a mess between user input and stored widget state so that the fids input overrides the actual data.

Saving works fine without clicking upload, it's really just Preview.

Steps to reproduce

  1. Add an image or file field to a content type
  2. disable javscript
  3. Start the upload of an image but do not click 'Upload'
  4. Click preview
  5. See the image in the preview
  6. Return to edit mode
  7. See the image is not displayed nor is the filename
  8. Save the content
  9. The image is not saved.

Proposed resolution

I have no idea :)

Remaining tasks

Decide what to do
Patch
Review
Commit

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed: needs info

Version

11.0 🔥

Component

node system

Created by

🇨🇭Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024