doesn't work with latest ACF Pro 6.0.2
error in console:
jquery.min.js:2 jQuery.Deferred exception: Cannot read properties of undefined (reading '0') TypeError: Cannot read properties of undefined (reading '0') at initialiseField (http://local.test/wp-content/plugins/acf-star-rating-field/js/input.js:10:38) at HTMLDivElement.<anonymous> (http://local.test/wp-content/plugins/acf-star-rating-field/js/input.js:75:4) at Function.each (http://local.test/wp-includes/js/jquery/jquery.min.js:2:3003) at s.fn.init.each (http://local.test/wp-includes/js/jquery/jquery.min.js:2:1481) at http://local.test/wp-content/plugins/acf-star-rating-field/js/input.js:74:11 at http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf-input.min.js:1:2262 at o (http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf.min.js:1:1417) at Object.doAction (http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf.min.js:1:587) at n.doAction (http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf.min.js:1:18166) at HTMLDocument.<anonymous> (http://local.test/wp-content/plugins/advanced-custom-fields-pro/assets/build/js/acf.min.js:1:27130) undefined
I'm experiencing the same issue. Looks like something goes wrong with the SVG rendering as well. Is this plugin still maintained @kevinruscoe ? It's a very helpful piece of code 😀
Doesn't work with ACF non-pro either, and seems to be now crashing ACF admin interface.
I started looking at it, and there is a function render_field which creates a
I think this issue is for all of ACF 6. The javascript needs to fail in a way it doesn't cause the javascript to fail.
https://github.com/kevinruscoe/acf-star-rating-field/blob/3166fd5dd35c2efa9580ec01d433832e7d9b1fbb/StarRatingField.php#L102
Also, SVG's work for me. That is incorrect. Only the SVG's from Font-Awesome are not working (according to the ticket)
Maybe a full fix?
This fixes the admin interfaces from crashing for ACF6. https://github.com/MGParisi/acf-star-rating-field
I'm uncertain if there is more. It's working for me now on ACF6 non-pro again. Though, I'm only using it on the front end.
@MGParisi Hey, I'll take a look at this over the weekend and hopefully get it fixed.
I'm sorry, but I can't replicate the issues.
I've just installed:
- WP 6.1
- ACF
- this plugin (from the master branch).
I made a simple star field and created a minimal theme
<?php
wp_head();
while(have_posts()) {
the_post();
the_title();
print get_field('star');
}
wp_footer();
And all 3 return types (number, list and FA list) work.
Can you guys provide more context, please?
Hi @kevinruscoe,
I've just come across this issue as well. For me, it was working up until trying to duplicate items in the field group. At that point, after refreshing, I was no longer able to edit fields until disabling the plugin.
@jarrod-collective Check out my fork, it resolves the issues. https://github.com/MGParisi/acf-star-rating-field