Support

Account

Home Forums Backend Issues (wp-admin) Filtering when using relational field types not working due to Select2 errors

Solving

Filtering when using relational field types not working due to Select2 errors

  • I have a Post Object field and want to filter by a custom post type. When I click on the select field to select a post type, the list is entirely empty (not showing regular post type or anything), and I get these errors in my console:

    [Error] TypeError: undefined is not an object (evaluating 'b.slice')
    	(anonymous function) (select2.full.min.js:2:10576)
    	(anonymous function) (select2.full.min.js:1:4462)
    	(anonymous function) (select2.full.min.js:2:10398)
    	(anonymous function) (select2.full.min.js:1:4462)
    	(anonymous function) (select2.full.min.js:1:9385)
    	(anonymous function) (select2.full.min.js:1:5100)
    	(anonymous function) (select2.full.min.js:1:4920)
    	(anonymous function) (select2.full.min.js:2:29484)
    	(anonymous function) (select2.full.min.js:2:27959)
    	(anonymous function) (select2.full.min.js:2:4229)
    	(anonymous function) (load-scripts.php:2:28682)
    	i (load-scripts.php:2:27368)
    	fireWith (load-scripts.php:2:28123)
    	x (load-scripts.php:4:22587)
    	c (load-scripts.php:4:26778)

    Similar filtering fields, like the one in the Clone field still works without giving me any errors. The errors seem to occur when trying to filter in the field types Post Object, Page Link, Relationship, User.
    I have tried disabling and deleting all my other plugins, but the error remains. I’ve also tried deleting ACF Pro and installing it again.

  • I’ve also got this issue which has been triggered since 5.9.2

    It affects my Select2 fields which are dynamically populated with custom data using custom JS. It seems to be trying to always populate using ajax even though not required.

    I’ve had to revert to 5.9.1 for now.

  • For future readers:

    Version 5.9.3 was released recently which fixed the bug πŸ™‚

  • 5.9.3 does not fix this issue for me

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

You must be logged in to reply to this topic.