Support » Plugin: Advanced Custom Fields: Font Awesome Field » Icon Search Fails On Register Page

  • Resolved Glark

    (@glark)


    Hello Matt! Thanks for this plugin, it’s fantastic. I am using it to let users choose an avatar and it works great to change icons for existing users. However the icon search fails if it is on the registration page with “the results could not be loaded.” I have a default icon set up and the registration will work with it, I just can’t change it. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matt Keys

    (@mattkeys)

    Hey @glark, not something I’ve run into before but I see what you mean.

    It looks like it is a WP Ajax permissions issue. This plugin is only configured out of the box for authenticated calls to wp ajax.

    A little proof of concept that would theoretically resolve this issue for you:

    function ACF_FontAwesome_NoPriv_AJAX() {
    	if ( class_exists( 'ACFFA_Loader_6' ) ) {
    		$ACFFA_Loader_6 = new ACFFA_Loader_6();
    		add_action( 'wp_ajax_nopriv_acf/fields/font-awesome/query', [ $ACFFA_Loader_6, 'select2_ajax_request' ] );
    	}
    }
    add_action( 'acf/include_field_types', 'ACF_FontAwesome_NoPriv_AJAX', 20 );

    This code would be added somewhere in your functions.php. Try it out and let me know if that works. I may add unauthenticated wp ajax calls for this function to a future update of this plugin but I need to think about it some more. I wouldn’t want something like that to become a vector for DDoS attacks or something.

    • This reply was modified 5 months, 2 weeks ago by Matt Keys.
    Thread Starter Glark

    (@glark)

    Success! I was typing about the typo then you corrected the typo! 🙂 Thank you very much, this solves a lot of problems for me. LMK if you have a tip jar or anything. Unfortunately I’ve already got a Pro FA license going.

    Plugin Author Matt Keys

    (@mattkeys)

    Glad to hear it. No tip needed but I do appreciate the sentiment!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.