Support

Account

Home Forums Backend Issues (wp-admin) Realtionship Fields Don't Show Values or Filter

Solving

Realtionship Fields Don't Show Values or Filter

  • Hi,

    So until today/yesterday, the relationship fields across all our custom post types were working. There was a list which you could filter by typing in a few characters.

    However – there is now no list and we can’t filter. We’re on the latest version of WP (which I believe may have been the issue)

    We added the following to wp-config and it has started working. Take it out, it stops working. Any idea how to look into this further or how to resolve

    define( 'SCRIPT_DEBUG', true );

    Thanks

  • You’re on the right track, there is either a PHP or JS error that’s causing the AJAX request for the posts to fail. You can try turning on error debugging and logging and then look in the error log to see if there are PHP errors https://codex.wordpress.org/WP_DEBUG, and look in console to see what, if any JS errors there are. If you can figure out where the bug is it will be easier to help.

  • Hi,

    This is my config

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', true);
    @ini_set('display_errors',1);

    No errors are shown either on the page, in the log or in the chrome console. Nothing at all.

    It only works when I set the following

    define( 'SCRIPT_DEBUG', true);

  • With define( 'SCRIPT_DEBUG', true); in place, this causes WP and most plugins (that follow the rules) including ACF to load the unminified version of JS files. This means that there is a difference between the minified and unminified version of some script that that the unminified version in some script is causing an error or otherwise interfering with ACF’s AJAX request.

    In order to figure out what’s going on you need to figure out what is causing the interference. First remove the line from your config and then deactivate other plugins and maybe switch to a default WP theme to see if you can narrow it down.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.