Home › Forums › Add-ons › Repeater Field › "Inserting" multiple images to Repeater
I posted this to the wordpress.org plugin page support forum, but this forum looks like it might be more active, so here’s a duplicate.
I’ve been using ACF for several projects, with a purchased copy of the Repeater add-on. I just upgraded to ACF 4.3.4 (with Repeater 1.1.1).
I have a WP site which uses a series of slides, which is defined by a Repeater of 2 fields: an Image and a Text.
I just inserted 23 images to the BEGINNING of an existing list of 30 slides, by pressing the insert + button at the top of the list. I selected multiple images from the Media Library, with the intention that they would get INSERTED before all the existing items, resulting in a list of 53 “slides”.
Instead, just the FIRST ONE of the 23 images got inserted as a NEW “slide”, but the remaining 22 REPLACED the images of the first 22 existing “slides”. In those slides, the original captions remained unchanged, but now they had a different (unrelated) image.
I expected all 23 images to get inserted as new Repeater items, and all the existing Repeater items to remain unchanged, at the end of the list.
It’s great that the Repeater allows multiple images to be added at once, and I’ve been using for that on a number of occasions. I don’t recall if I ever inserted them WITHIN a list before (or only at the end), but I hadn’t encountered this problem before.
It seems like a bug, possibly with the new version? Or is this “replace” behavior intended.
Reply
You may be running up against WordPress’ maximum custom fields count. Add this to your functions.php file and give it another shot. Might not be the issue at all but it would help to rule it out.
add_filter( 'postmeta_form_limit' , 'customfield_limit_increase' );
function customfield_limit_increase( $limit ) {
$limit = 100;
return $limit;
}
Hi @willthemoor
This issue is not related to PHP saving of data, and please note that ACF dos not use the ‘postmeta_form_limit’ filter. This is only for the core WP metabox.
Thanks for the bug report. I’ll have a look at the JS and find out why it did not insert the images.
Thanks
E
The topic ‘"Inserting" multiple images to Repeater’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.