ProcessWire icon indicating copy to clipboard operation
ProcessWire copied to clipboard

Image upload and PageTable - Uploads get lost after page save

Open flipzoom opened this issue 9 years ago • 2 comments

I have a problem with the image upload via the CKEditor in combination with the PageTable-Inputfield. When I edit the page with the PageTable and uploading a new image over the CKEditors function "insert image", the uploaded image is deleted after saving the page and the image is not displayed before I save the entire page. This happens also when i don't use PageTableExtend Module. The log is said that the picture would be temporary and has been deleted (Removed 'XXX' temp file(s) for page XXX).

I have on the page one Image-Field (name: assets_images), which has no particular restrictions, and no limit on the number of images. This is located under the "Assets" tab - its only grouped in a tab for better organisation. This happens also, when i put the Imagefield in the content tab.

When I upload the image directly via the Image Field "assets_images" in Assets tab and then select them in CKEditor, it works without problems. There is only a problem with the upload in the modal window.

Processwire version: 3.0.15

For a better understanding, I have recorded the problem

pw-image-upload-bug

flipzoom avatar Apr 19 '16 12:04 flipzoom

I don't currently know a way around this issue. What you are duplicating here is basically the scenario where you've got two people editing the same page, and one persons edits overwrite the other persons. Though let me know if I'm wrong. What I observe in your screencast is that you are editing a page "test" and then editing a PageTable page within it, and then going from that PageTable page and editing the original "test" page again from within it (i.e. the file upload). When all those modals are closed, and you save your "test" page, it has no knowledge of that image you uploaded because the state of the "test" page reflects an earlier state, before the image was uploaded.

ryancramerdesign avatar Jun 02 '16 12:06 ryancramerdesign

Hi Ryan,

excuse my late response. That you have understood correctly. In this procedure, the uploaded file is deleted by storing the page "test" again. The problem is probably in the modal window for selecting / upload, because this automatically loads the upload field from the page "test". I've seen anywhere in the source that the modal window for selection / uploads is trying to find an upload field. The PageTable page does not have upload field, but the page "test", for all assets of this page.

flipzoom avatar Jun 11 '16 14:06 flipzoom