MichaelHafner Posted Sunday at 05:14 PM Posted Sunday at 05:14 PM (edited) Hi all! ProcessWire 3.0.200 1.) I use one repeater in two templates. 2.) The setup is the same in both cases: No access control for the template, no access control for the field. 3.) No problem in using the repeater via API in both templates. BUT: 4.) In one template, I can (via Admin backend) add, edit, and delete repeater items (whether the repeater is populated or not.) 5.) In the other template, I can edit existing repeater items (whether the repeater is populated or not). I cannot, however, add new items. 6.) exceptions.txt says: "2026-10-11 19:04:29 admin https://vfm-online.de/cms/processwire/processwire/page/edit/?id=1063&field=person_adresse&repeater_add=1&repeater_not=1158_1253_ Invalid value for $existingItem argument (in /wire/core/InputfieldWrapper.php line 424)" 7.) But what does that tell me? And why does the error occur with *all* records belonging to this template and never with records from the other? It used to work... - I'm lost. Anybody who could give me a hint? Best & thank-you Michael Edited 16 hours ago by MichaelHafner
MichaelHafner Posted 17 hours ago Author Posted 17 hours ago In log entry... 2026-10-15 15:43:48 admin https://vfm-online.de/cms/processwire/processwire/page/edit/?id=1063&field=person_adresse&repeater_add=1&repeater_not=1158_1253_ Invalid value for $existingItem argument (in /wire/core/InputfieldWrapper.php line 424) 1063 is the id of the repeater's parent, 1158_1253_ are the concatenated ids of the two existing repeater items. On a page with no existing repeater items, the log entry looks like this: 2026-10-15 15:50:25 admin https://vfm-online.de/cms/processwire/processwire/page/edit/?id=142467&field=person_adresse&repeater_add=1 Invalid value for $existingItem argument (in /wire/core/InputfieldWrapper.php line 424) But what can I do with that? I won't do any good to look into /wire/core/InputfieldWrapper.php, as it can't be a bug. I'm a little desperate as this occurred, out of the blue, in a productive system. Now we can add persons to our register, but we can't write down their addresses.
MichaelHafner Posted 16 hours ago Author Posted 16 hours ago Solved it, but I still have to figure out, why. Or how. 😄 I had added a button before another form field (v.i.). Seems by doing so I made the button a form field (which, actually, prevented any repeater item from being created, not just addresses)? But why, then, didn't the form stop working at all?! - Anyway, I put the button before the submit button, et voilà. public function otlet_addbuttons ($event) { $page = $event->object->getPage(); switch ($page->template->name) { case "vfm_person": if($page->get('remote_addr') != '') { $form = $event->return; if(!$form->get('otlet_put_ip_on_blacklist')) { $button_1_text = __("IP auf Sperrliste"); $button_1 = $this->modules->InputfieldSubmit; $button_1->attr("value", $button_1_text); $button_1->attr("name", "otlet_put_ip_on_blacklist"); // Doesn't work # $form->insertBefore($button_1, $form->get("remote_addr")); // Works $form->insertBefore($button_1, $form->get("submit_save")); } } } }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now