Custom Fields
Re-Envisioned
Support General Lots of images in an image_advanced can wipe all images in that field on save

This topic contains 7 replies, has 5 voices, and was last updated by  Anh Tran 1 year, 11 months ago.

  • Creator
    Topic
  • #2953

    sam-kelly-dev
    Participant

    Discovered a tricky-to-diagnose bug today. I have an image_advanced field that I’m using to create a simple gallery, and it’s got close to 200 images in it. Adding and working with that many images is fantastic. However, recently the person who works on that page reported that when she made a change to the content field (not the image_advanced), all of the images disappeared.

    I wasn’t able to recreate the issue until just now. It turns out that if you save the page before all of the images load into the image_advanced metabox display, it saves the page without any images at all, and the next time the page loads, they’re all gone.

    I’d say this is a fairly major issue, but maybe that’s the expected behavior? I’m not sure. I guess my solution would be… when saving, check if there’s an image_advanced. If there is, has the content of it loaded? If yes, cool, overwrite what’s in the DB, because changes may have been made. If it hasn’t loaded yet, don’t overwrite anything, or overwrite it with whatever it’s currently requesting (same result in the end).

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #2956

    Anh Tran
    Keymaster

    Hi Sam, thanks for describe the problem in details :). It helps a lot.

    I think you’re right about the problem: when images are not loaded, there are no inputs for images which stores image IDs, so when push the Update button, empty field is submitted and thus, no images are saved.

    I will think more about your solution and make a fix for that.

    #3132

    david82.rs
    Participant

    Hi Anh, Did you find a solution for this issue? I just discover the problem and i think is really important to fix this.
    In one morning i had to re-upload the images three times! because the client did the upload page before all images was loaded.

    Thanks

    #3134

    Anh Tran
    Keymaster

    Hi, we’re working on that. First we tried to use hidden input as Sam suggested, but it had some problems with cloning feature. So we postpone to find a better solution. We’ll update as soon as there’s a good solution.

    #3233

    nicolas
    Participant

    I’m not sure, but I think this is a POST vars limit issue. It looks like a tricky problem one of my client had when saving her menu in WP. She had over 100 items in her menu and when she updated the menu with changes, parts of the menu just disappeared (like if they were overwritten or just dropped) what I did was augmented the value for max_input_vars to a larger number like 3000 (provided you have access to php’s config). It helped but in the end I suggested the client to rethink the way she used her menu so she would need less items in it.

    I’m not saying this is the same problem here, but it made me think of that issue I had so it might help you find a more accurate solution.

    this link talks about the menu limit problem in wordpress: http://sevenspark.com/wordpress/menu-item-limit

    #3234

    nicolas
    Participant

    After rereading the issue, it doesn’t seem to be a POST vars issue. Anyhow, it might still spark an idea to find a better solution!

    #5823

    jroxbury
    Participant

    Has anyone came up with a solution for this? This happens for me as well. Make a quick edit on a page and press update before the images are done loading they all disappear.

    #5843

    Anh Tran
    Keymaster

    Unfortunately, we haven’t get a solution for it now. The speed of JS is still a problem.

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.