Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • @mateuszgbiorczyk I’ve managed to figure out the issue, it isn’t multisite related at all, it is ACF related. We are using ACF Flexible Content for everything and the data for this is stored in the _postmeta table and not the posts table.

    @mateuszgbiorczyk – Sorry it has been so long, but I had to work on something different and now I’m back on the original project that was using the plugin. So I have now added your debug code and get the output and this is the query I got:

    SELECT DISTINCT SQL_CALC_FOUND_ROWS
    wp_10_posts.*
    FROM wp_10_posts
    INNER JOIN wp_10_postmeta AS a ON (a.post_id = wp_10_posts.ID)
    INNER JOIN wp_10_postmeta AS b ON ((b.meta_id = a.meta_id + @@auto_increment_increment)
    AND (b.post_id = wp_10_posts.ID))
    INNER JOIN wp_10_posts AS c ON (
    (c.post_type = ‘acf-field’)
    AND (
    (c.post_content LIKE ‘%:”text”%’)
    OR
    (c.post_content LIKE ‘%:”textarea”%’)
    OR
    (c.post_content LIKE ‘%:”wysiwyg”%’)
    )
    )
    WHERE 1=1
    AND (
    (
    (
    c.post_name = b.meta_value
    )
    AND
    (
    a.meta_value LIKE ‘%test%’
    )
    )
    OR (
    (
    wp_10_posts.post_title LIKE ‘%test%’
    )
    OR
    (
    wp_10_posts.post_content LIKE ‘%test%’
    )
    OR
    (
    wp_10_posts.post_excerpt LIKE ‘%test%’
    )
    )
    )
    AND wp_10_posts.post_type IN (‘post’, ‘page’)
    AND (
    wp_10_posts.post_status = ‘publish’
    OR
    wp_10_posts.post_status = ‘acf-disabled’
    OR
    wp_10_posts.post_status = ‘private’
    )
    ORDER BY wp_10_posts.post_title LIKE ‘{f2430de4ac2e5caa5885164f7569b233c8de81e5f12374f72f76a9dd2e55e406}test{f2430de4ac2e5caa5885164f7569b233c8de81e5f12374f72f76a9dd2e55e406}’ DESC, wp_10_posts.post_date DESC
    LIMIT 0, 10

    It appears to be referencing the correct tables, e.g. the _[site-number]_ tables, so I’m not sure why it isn’t working.

    Sorry, misread that last reply. I’ve tried adding the code snippet but it doesn’t appear to get called as it doesn’t output anything from there. I will try and take a look this week and see if I can debug further.

    I appear to have the same issue, are you going to release an update for this?

    Thanks.

    Andrew.

    Thread Starter Andrew Dixon

    (@aandrewdixon)

    Hi Michael,

    Thanks for the reply and I understand it is probably WP core and not the plugin but I thought people here might have an idea of a resolution for the issue.

    I tried the WordPress stack exchange group already, but they suggested asking here!!! ??

    If anyone has any ideas for a resolution, I’d be interested in hearing.

    Thanks

    Kind regards,

    Andrew.

Viewing 5 replies - 1 through 5 (of 5 total)