ACF Taxonomy field fatal error
Hello,
I have problem with ACF Taxonomy field.
It seems that this field type doesn’t work with BeTheme.
Any other type works fine.
When I use ACF Taxonomy field I got fatal error on page.
I can see following info:
Fatal error: Uncaught TypeError: str_replace(): Argument #2 ($replace) must be of type string when argument #1 ($search) is a string in /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/functions/modules/class-mfn-dynamic-data.php:46 Stack trace: #0 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/functions/modules/class-mfn-dynamic-data.php(46): str_replace('{acf:udogodnien...', Array, '{acf:udogodnien...') #1 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/functions/theme-functions.php(16): MfnDynamicData->render('{acf:udogodnien...', false) #2 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/functions/builder/class-mfn-builder-items.php(545): be_dynamic_data('{acf:udogodnien...') #3 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php(2763): Mfn_Builder_Items::item_column(Array, false) #4 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php(2466): Mfn_Builder_Front->show_items(Array, 0, false, false) #5 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php(1458): Mfn_Builder_Front->show_wraps(Array, 2, false) #6 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/functions/builder/class-mfn-builder-front.php(333): Mfn_Builder_Front->show_sections(Array, false) #7 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/single.php(65): Mfn_Builder_Front->show() #8 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-includes/template-loader.php(106): include('/home/users/kul...') #9 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-blog-header.php(19): require_once('/home/users/kul...') #10 /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/index.php(17): require('/home/users/kul...') #11 {main} thrown in /home/users/kulinarnagdynia/public_html/kulinarnagdynia-new/wp-content/themes/betheme/functions/modules/class-mfn-dynamic-data.php on line 46
The problem is with multiselection. When I have only one value (position) marked then it works without problems. But when I check few values, then I have fatal error.
Any suggestions what to look for?
Comments
Hi,
Our ACF support is limited only to basic string based values.
https://www.advancedcustomfields.com/resources/shortcode/#limitations
You are probably trying to use taxonomy which return an array and you that is why this error is appearing.
You must change fields with dynamic type into simple string fields.
Best regards
Those Taxonomy fields with an old Theme works as a charm. So the problem is with BeTheme only.
If you do not support ACF taxonomy fields, the question is if I can turn off your theme for posts from only one category? That’s should help to work ACF fields correctly.
Please send us the WordPress dashboard and FTP access privately through the contact form, which is on the right side at http://themeforest.net/user/muffingroup#contact, and we will check that out.
Notice!
Please attach a link to this forum discussion.
Sending incorrect or incomplete data will result in a longer response time.
Therefore, please ensure that the data you send are complete and correct.
Thanks
I have sent those data yesterday. Thx.
Please check it out now.
Best regards
The solution is not perfect, because the taxonomy ACF field is not loaded at all.
So I can not use data from this field.
Can you check this again.
It seems that you turned off this field from Betheme.
As I mentioned before, Dynamic Data in Betheme allows only string based values, and you are trying to load dynamic data that is an array, and it will not work.
Best regards
So, is there a way to load standard php with standard ACF commands get_field() with BeTheme Builder.
I can load "pure" PHP template for this one category. Then ACF taxonomy works fine. Then I can use BeTheme Header and Footer.
But it would be greate if I can load to the content part of BeTheme Buiilder and part od PHP code.
Please leave your suggestions as comment on the following topic:
https://forum.muffingroup.com/betheme/discussion/113/your-suggestions-for-future-updates#latest
Thanks to that, we will not miss it among other forum topics.
Best regards