Skip Navigation

[Resolved] View Limits ACF Repeater Field Output to Only 10 Rows

This support ticket is created 2 years, 1 month 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 8 replies, has 2 voices.

Last updated by Ed 2 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#2471319

Ed

I'm using Toolset & ACF. I know you don't provide support for ACF. I'm just trying to find where the issue lies.

I have a View that includes data from an ACF Repeater field (12 rows), but only 10 rows are displayed. No maximum is set in the View.

Is this a known issue? Is there a fix or workaround available? Does the issue lie with ACF or with Toolset?

Thank you.

(I've also submitted a ticket with ACF)

#2471371

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

What do you choose for Content Selection for the View?

What happens if you *do* set a limit in the View (a high limit, e.g. 999)?

I would turn on debug mode for the View and inspect the query parameters as well as the resulting SQL query to spot if a limit is being applied (and if the limit you set such as 999 survives through to building the SQL query).

Go to Toolset > Settings > Front-end Content to activate the debug mode.

#2471433

Ed

What do you choose for Content Selection for the View?
Processing Items

What happens if you *do* set a limit in the View (a high limit, e.g. 999)?
No change.

I was able to turn on debug mode, but I didn't see anything that looked like a 10-row limit.

#2471437

Ed

I'd be happy to provide admin access.

#2471917

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sure, let me set a private reply to get credentials.

Please give clear steps we can follow to see the set up and the issue.

#2471955

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, I see what's going on.

Your View is querying a post type Processing Item, and there is an ACF repeater field assigned to that post type.

Toolset isn't designed to handle ACF repeater fields, and so you are outputting each instance of the repeater field manually.

So the first instance has custom field meta_keys like details_0_type, the second like details_1_type, the third like details_2_type, etc.

You have conditional rows for each of those instances in the output of the View, going from 0 through 9, but you stop there. So that's 10 instances. If you want more instances implemented this way you will have to keep adding sections for each possible instance, e.g. details_10_type, details_11_type, etc.

This isn't a particularly efficient way of handling this.

I assume ACF has some functions for handling the output of repeater fields more dynamically (or, at least, some tutorials about it), and I would be inclined to register a custom shortcode that dynamically outputs rows for however many instances of the repeater field there are for the current post, and then insert that shortcode in the output of your View.

#2471959

Ed

Nigel, this is the weirdest thing...
When I was looking at the view, the other day, there were only 7 of those conditional statements viewable (Firefox). There was white space the rest of the way down. I couldn't understand why the editor was so large (tall).

Now I see them all (Firefox).

I'll definitely look into the shortcode solution. That seems a better way to go, but it also seems a bit beyond my capabilities. I'll give it a try, but I might need your help again!

I guess that would resolve this ticket. Thanks for taking a look at it.

#2471971

Ed
Screenshot 2022-10-07 at 08-04-46 Edit View ‹ Fortson's Taxidermy — WordPress.png

Nigel,
I just checked the other view (Hog Processing Items). Please see attached.

That's what I was referring to, when I mentioned that I wasn't able to see all those conditional statements. If I select all, I'm able to copy all the statements and paste them into Notepad, but I'm not able to see them in the view editor.

#2471983

Ed

If I click in the view editor, all those statements appear. I don't know why, but I'm OK with that.

Thanks again!