Advanced Custom Fields

Share your feedback...

The tax filter on relationship field breaks the editor window when you have 50 thousands tags.
I have a news site that I am using the ACF “relationship” field to create a related articles section. Our site still uses the classic editor, with traditional ACF meta boxes to house our ACF custom fields. Our site has roughly 50,000 tags in our database, accumulated from over 25 years of publishing news. When I turn on the taxonomy filter in our related articles “relationship” field it totally crashes my editor window. The page will not scroll or resize. No errors are reported anywhere: the JS console is empty, and our php debug log is completely blank. The browser tab becomes basically unusable. It will not refresh, or do anything, I have to close the tab and reopen a new one to do anything. But if I then turn the taxonomy filter in the “relationship” field back off, everything goes back to working fine. I have tested this behavior with with all of my plugins deactivated and with only the default twenty twenty-four theme activated. I have conclusively narrowed the problem down to the taxonomy filter checkbox checked with our 50k tags. I suspect that the “relationship” field is triggering the load of all of my 50k tags, when I either scroll or resize the window. And then the browser crashes when it tries to build that enormous taxonomy dropdown menu. I have two suggestions To address this situation. I would suggest that you set the taxonomy filter to not preload all of the tags, and instead use an ajax call to query the database for the results when input is entered into the box. But regardless, loading everything into the DOM is unusable if you have thousands of tags in your system. My other suggestion would be to allow refining the taxonomy filter in the admin to only allow specific taxonomies, like you do with post types. If I could have the taxonomy filter only show categories, and not tags, that would solve the issue for me, as we only have a couple dozen cats, and are general enough to be useful for filtering.
0
Load More