Support

Account

Home Forums Backend Issues (wp-admin) Multiple Image Fields won't Save (ACF 4.2.2)

Solved

Multiple Image Fields won't Save (ACF 4.2.2)

  • Hey, first of all I know you probably hear this a lot, but thank you for this AMAZING plug in. As far as my question, I remember reading a post here where you mentioned issues with image cropping and acf not being able to save and display images properly. I can’t find the thread but I think that was the jist of it. I bring it up because I am having problems similar to the OP of that thread.

    I have a page where multiple biographies are displayed and the client can simply fill out custom fields for each person. For example, the first field group is PERSON 1, and in this field group there is a field labeled Picture (field value saves as ‘picture1’). Then the same is repeated for the field group PERSON 2. So it looks something like this:

    PERSON 1
    Name (‘name1’)
    Picture (‘picture1’)
    Bio (‘bio1’

    PERSON 2
    Name (‘name2’)
    Picture (‘picture2’)
    Bio (‘bio2’)

    Now the problem is that the image for ‘picture2’ will not save. I include an image, and I see its thumbnail in the field input before I update the page, but as soon as I update the page it disappears and instead of the thumbnail I see a blank image. The same is true when I preview the page. The other fields within the PERSON 2 field group are saving, so the problem only applies to the images. I have also tried to save different images, including the same image I use in ‘picture1’, but I get the same result, so I don’t think it’s an issue with cropping.

    I am using WP 3.6.1, tried to save it while disabling all my plugins (except one that I need) and deactivated the theme, but it is still happening. Any clue?

  • Hi @truheart

    The issue is either 1 of 2 things:

    1. The image is not uploading. To test this, access the media library and search for the image. Does it exist?
    2. The crop size does not exist. To fix this, use a plugin to regenerate thumbnails.

    If you can, also check your DB and find the row which contains the value of picture2. What is the meta_value?

    Thanks
    E

  • Hi Elliot,

    The reason why I don’t think it’s 1 or 2 is because I checked to see if “picture2” would save the image I used in “picture1”. The image worked fine for that field, so by the “picture2” field not saving it I’m guessing it’s something wrong with the plugin or database vs. the image.

    I’m sorry that I am pretty clueless when it comes to databases, so bear with any stupid comments or questions that follow. I searched my database and found a couple of rows which contain the value, 12 in wordpress_posts 11 of which are revisions, and 28 in wordpress_postmeta. In the postmeta table, I see a couple of different meta_values. For meta_key “_picture2”, the value is “field_5267ea8229947”. For key “picture2”, it’s “995”. Then there are two more keys “field_5267e896a6a10” and “field_5267ea8229947”.

    I have no idea if that helps at all, please let me know if you need anything else. Thanks again.

  • Hi @truheart

    Just to confirm, ACF will correctly save 1 image, but not another?

    What if you remove the image from the ACF field, and then re-upload it again? Does it work?

  • Sorry I haven’t gotten back to you Elliot, I had trouble signing on a few times but I think it was because it was from an insecure network. I actually got it to work by simply changing the field values. I don’t have any other custom fields with those values, so I’m not exactly sure what the problem was.

    But to confirm your questions, yes ACF was saving the first image but not others. I did remove and upload the image and it didn’t work. My guess is some issue in the database?

  • Hi @truheart

    Sounds like it. Glad you got it working!

    Sometimes, it is the server or environment that creates these annoying bugs!

    Thanks
    E

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Multiple Image Fields won't Save (ACF 4.2.2)’ is closed to new replies.