Home>Support>Indexing broken when using custom field in repeaters

Indexing broken when using custom field in repeaters

So I have the exact same problem as this poster whose thread was closed:

Indexing broken when using custom field in repeater

All fields inside a repeater are given a name originally set with #repeater-name# as a placeholder and The SiteOrigin admin.min.js file is supposed to replace these placeholder with the actual index of the field inside the repeater. So eg. I have a repeater called “taxonomies” and I have a custom field called “taxselect”. The name is outputted as widgets[c59][taxonomies][#taxonomies#][taxselect] and should be changed to widgets[c59][taxonomies][0][taxselect] when the page runs, but it is not. This is causing the field data to mess up when the page is saved.

After some digging around the admin.js file, I found the place where I think this exchange is happening at line 487 in the updateFieldPositions event. The problem I can see is that the function is ONLY looking for fields which have the .siteorigin-widget-input class. I went back to my custom field and added the .siteorigin-widget-input class to my inputs (they were actually select boxes so I had .siteorigin-widget-select originally on them) and it now works.

Seems like a bug to me.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 3 months ago Alex S
    Hi, I Work Here

    Hi,

    I’m going to forward this to Greg to see if he has any ideas. I also recommend posting this as an issue on the SiteOrigin Widgets Bundle repository.

  2. 7 years, 3 months ago BraveDigital

    Thanks, I have submitted an Issue to the Github repo.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More