Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't work with latest ACF Pro 6.0.2 #50

Open
andsat opened this issue Oct 7, 2022 · 9 comments
Open

doesn't work with latest ACF Pro 6.0.2 #50

andsat opened this issue Oct 7, 2022 · 9 comments

Comments

@andsat
Copy link

andsat commented Oct 7, 2022

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

@dhunink
Copy link
Contributor

dhunink commented Oct 7, 2022

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 😀

@MGParisi
Copy link

MGParisi commented Nov 3, 2022

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 <script> tag with the initialization of that field in it. For some reason, this doesn't seem to be getting added in the Custom Fields of the Admin. This causes an Error and breaks it.

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.

@MGParisi
Copy link

MGParisi commented Nov 3, 2022

public function render_field($field)

@MGParisi
Copy link

MGParisi commented Nov 3, 2022

Also, SVG's work for me. That is incorrect. Only the SVG's from Font-Awesome are not working (according to the ticket)

@MGParisi
Copy link

MGParisi commented Nov 3, 2022

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.

@kevinruscoe
Copy link
Owner

@MGParisi Hey, I'll take a look at this over the weekend and hopefully get it fixed.

@kevinruscoe
Copy link
Owner

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?

@jarrod-colluco
Copy link

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.

@MGParisi
Copy link

MGParisi commented Nov 17, 2022

@jarrod-collective
Check out my fork, it resolves the issues.
https://github.com/MGParisi/acf-star-rating-field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants