Home › Forums › ACF PRO › Continuous loop in Relationship field with custom title + custom search › Reply To: Continuous loop in Relationship field with custom title + custom search
Sorry, I didn’t see the second hook, I was thinking it was something simple. Honestly, I can tell what the functions search_custom_meta_acf_add_join and search_custom_meta_acf_alter_search are doing and if it’s doing it correctly or incorrectly, obviously there’s something wrong there.
What does the actual query that being run look like? That would probably give you some clue about what’s actually happening, as well what the actual results being returned are.
Since this is happening during AJAX you’ll need to be creative to see what’s actually going on.
// add this to wp-config.php
// to log errors
define('WP_DEBUG', true );
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
// add this action to
// log complete query to error log
add_action('posts_selection', 'log_the_query');
function log_the_query($query) {
error_log($query);
}
Then you can look at the query that’s being done an see if there’s anything in it that could cause the problem.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
📣 “ACF Chat Fridays”
— Advanced Custom Fields (@wp_acf) January 31, 2023
The ACF team holds their first open office hours this Friday! Come and talk ACF, and ask questions about building sites with the plugin.
We’d love to see you there!
📆 Friday 3rd Feb - 3pm UTC
👉 Register here - https://t.co/3UtvQbE4CU pic.twitter.com/oTwW9K1XQ0
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.