Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Tim

ACF repeater field help!

Hello,
Love this plugin.
I have data with a repeater field in it, defined by ACF. I have the ACF addon installed. I downloaded everything today so everything is the latest.

I created my content today with most current versions of ACF and am reading it with most current versions of Admin Columns pro on up to date WordPress.

I have a field that is a repeater. There are multiple rows, and each row contains two fields. It would be ideal to see all rows with all fields, but I would settle for all rows with one field of my choosing. In my index page listing, I get only the last field from the last row. Is there some way to improve this result?

Can you help me?

Thank you.

1 year, 3 months ago
Tim

Adding notifications…

1 year, 3 months ago
Tim

I see in the php log that the index page is throwing a SQL error related to WP_Query!
WP is at 5.4.2, ACF is at 5.8.12. Your plugins I downloaded today.
admin-columns-pro | active | none | 5.2.3 |
ac-addon-acf | active | none | 2.6.2 |

1 year, 3 months ago
Tim

Hmm, now that error is gone. But the problem remains. And I get this: [04-Aug-2020 00:18:44 UTC] PHP Warning: implode(): Invalid arguments passed in /Users/myserver/Sites/ipo/wp-content/plugins/ac-addon-acf/classes/Field/Select.php on line 36

1 year, 3 months ago
Stefan
Developer

Hi Tim,

Unfortunately, the repeater field is not very extended at this moment.
But it should be able to show a specific field for all rows available for the record on the overview.
You say it only shows you the last item. What type of subfield did you select?
It’s good to know that we’re working on a refactor of the ACF integration where we have better support for the repeater, clone, and group field which are not or not well supported at the moment.

1 year, 3 months ago
Tim

It seems like it should work…My postmeta repeater has rows with a text field and a number field. Some posts have more than one row. (I am using a CPT). Your program knows the subfield names and prompts me to select the one I want which is the text field. It even asks how to delimit the results. But then it serves up a mdash. If I pick the number sub field, then it displays the value in the last row’s number sub field, not a delimited list of all values.
If I pick the ‘Number of Rows’ option, it correctly displays the number of rows.

1 year, 3 months ago
Tim

Actually, it is displaying the number field now. I had to set the format explicitly. But still not displaying the text field.

1 year, 3 months ago
Tim

At last! The text field is not a ‘text’ field. It is the result of a ‘select’. Could that be the problem?
Any work around I can apply? The results are stored in the postmeta table as a text string, nothing fancy.

1 year, 3 months ago
Tim

Remember, I get this warning. PHP Warning: implode(): Invalid arguments passed in /Users/hyperarts01/Sites/ipo/wp-content/plugins/ac-addon-acf/classes/Field/Select.php on line 36

Now that I see the connection, perhaps there is a problem in classes/Field/Select.php . I mean, warnings are often ignoreable, but maybe in this instance it is a sign of a deeper problem?

Thanks

1 year, 3 months ago
Tim

So, I looked at your plugin code and I was able to fix part of my problems.

I edited (this is not what I like to do) the file classes/Field/Repeater.php .

Just below line 51 I added a new line.

Basically, line 51 reads the value of the subfield based on subfield[‘type’].
The line I added below 51 said that if strtolower(subfield[‘type’]) == ‘select’, to set the value using a ‘text’ field type instead.

So now my cpt index page displays the values properly but it does not allow me to filter on them.

Thoughts?

1 year, 3 months ago
Stefan
Developer

You’re indeed right that the warning should never happen, so that is something we need to fix.
I can make a hotfix for that and it will give you some values for the select subfield in the repeater field.
But it will not change that it will show you the raw_value instead of the labels that are associated with the keys. That is an issue that is not easy to fix in the current version. It will be fixed in the complete new refactored version of the ACF integration. I’ll send a copy of the fix to your email.

1 year, 3 months ago

You must be logged in to reply to this topic.