Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It's a bit strange. For admin ("user 0") everything is ok. If someone else use the image fupload for massupload the second page after "next step" (/list_imagefields) would show all images which have ever been uploaded before. In my case it's a very large number and so the list grows so long until the maximum execution time of the server stops it.
Comment | File | Size | Author |
---|---|---|---|
#8 | stucked images at previewlist patch | 1.66 KB | mezitlab |
Comments
Comment #1
grandcat CreditAttribution: grandcat commentedNo, it isn't. It seems that you didn't press the button on the bottom of the "next step" page.
Comment #2
artscoop CreditAttribution: artscoop commentedI have the same problem all of a sudden, yet I am admin.
The problem is that the list of images is above 100, and it always overflow the PHP memory limit.
It has become quite worrying for me.
And I don't know how to remove the stale entries.
Comment #3
grandcat CreditAttribution: grandcat commentedDid you press "Save" at the bottom of that page? Otherwise, the images won't be deleted.
Comment #4
artscoop CreditAttribution: artscoop commentedHello,
of course I did. I press "Save" at every node. (But as I said, the process can be interrrupted by a PHP Memory Limit error, I tried this also on a 512Mb limit).
Here is what happens :
- I have an error while uploading images. Let's say there are 100 images remaining.
- If I create a new node, and upload images using FUpload, the preview list will contain the 100 remaining images (that I don't want) + the new images I've just uploaded. At this time, it's still ok for me.
- If I create another new node, the preview list will contain some images that were already uploaded.
This problem has been resolved by deleting some entries in the database with Phpmyadmin.
Comment #5
artscoop CreditAttribution: artscoop commentedI think using the batch feature of Drupal 6 can avoid those memory issues. (But I don't know the API)
Comment #6
grandcat CreditAttribution: grandcat commentedThe entries should be deleted automatically when pressing "Done editing". Are there any error messages? Please have a look in your Drupal log.
Comment #7
twooten CreditAttribution: twooten commentedI am also having the same problem as described in #4. Yes I clicked save. How can I remove these images?
Thanks
Tim
Comment #8
mezitlab CreditAttribution: mezitlab commentedI found the reason of this strange error.
There is my scenario:
Given a server with limited resources, like Memory Limit, Processor limit or Maximum Execution Time.
But the user don't know it and want to upload a lot of pictures. He select pictures from the directory, then click to save button. If the pictures upload, he will click to Next step. He comes to the node/add/%image_node_type/list_imagefields page. After the edit of titles and bodies, he will click to the Done editing button on bottom of the page. If he get any error during the processing, like Fatal error: Maximum execution time of 30 seconds exceeded in ... or something like this, then the processing will stop and the contents of the queue won't delete. He will be reload the page, will try it again and again, and the problem won't be solved, because he hasn't enough resource on the server.
So, I created a patch for this. This isn't a professional solution, but can solve the problem temporary and step by step can decrease the number of pictures in the queue.
Would be better, if the processing of this last step made by cron, because you can avoid to run out of the resource only this way. I think.