Skip Navigation

[Escalated to 2nd Tier] Last previously used field is not available once used 3 out of 4 previous fields

This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Waqar 2 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#2326423

I am trying to: Utilize the same set of four fields in two different places on the site.

Building, Room, Start Time and End Time

Link to a page where the issue can be seen: Local install, but duplicated in a clean install that was only running Toolset.

I expected to see: All four of my fields in the previous fields list after clicking the previous fields button. Which worked perfectly for the first 3 times I did it. The list always showed all available previously used fields that where still available.

Instead, I got: to point of adding the last previously used field and the previous fields button was no longer available. So I couldn't add in the last of the previously used fields I wanted.

Work around: Add in another random field somewhere. This gives you the button again so you can add the field you want.

My conclusion: Whatever creates the button when you have available previously created fields to use isn't counting an array at 0 or has some other oddity that prevents it from counting how many fields are still available to be reused correctly.

#2326427

Since it was fresh on my mind I though I would provide the method to reproduce this issue which I did again to make sure I didn't miss anything.

1. Created a local wordpress site and installed and updated to the latest version of Toolset and Toolset Blocks.
2. Created a Post type called Tracks and Speakers
3. Created Custom Fields assigned to Tracks for Building (single), Room(single), Start Time (date) and End Time (date).
4. Created Custom Fields assigned to Speakers using a Repeating Group called Speaking Times.
5. Using the Add Fields button and Click on the Button labeled Choose Previously Used Fields I added Building, Room, and Start Time. When I went back to add End Time the button is not available.
6. To get around this I created one additional field outside of the repeating group called temp. Didn't seem to matter what it was.
7. Went back to the Repeating Group and clicked add field and then Choose Previously Used Fields button is available again.

#2326875

Hi,

Thanks to your clear steps, I was able to reproduce this behavior on my test website too.

When a repeating field group is present in the current field group, the option to choose from the existing fields, becomes unavailable, one field sooner.
( the conditional check that compares the count of all the 'available existing fields' and the 'fields added in the current field group' fails, because the repeating field group itself if also counted in the current field group's count )

I've shared these findings with the concerned team for further review and for now, your workaround of adding one dummy/random field should work just fine.

regards,
Waqar