[Post Indexer] Post Indexer not working

Post Indexer is not indexing Page(s) in multisite environment. Dont have the (wp_site_posts, wp_term_counts).

  • Ash

    Hello Pat

    We need some more information about the issue you are having. Are you getting any error? If so, would you please post the full error here? A relevant screenshot would be more helpful.

    Besides, would you please enable debug mode and check if there is any error? To enable debug mode please go to wp-config.php and change

    define( 'WP_DEBUG', false );

    to

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'WP_DEBUG_LOG', true );

    Now try to index again. That will create a file called debug.log inside wp-content folder. Open that file, check the very bottom and you will see the latest errors. Please send me those.

    Have a nice day!

    Cheers,
    Ash

    • Pat

      debug.log

      [20-Jun-2018 13:00:58 UTC] PHP Notice: Undefined variable: local_id in /nas/content/live/lautrec2017/wp-content/plugins/post-indexer/classes/cron.postindexerrebuild.php on line 215
      [20-Jun-2018 13:00:59 UTC] WordPress database error Table 'wp_lautrec2017.wp_3_wpgmza_datasets' doesn't exist for query
      SELECT *
      FROM wp_3_wpgmza_datasets
      WHERE map_id = '1'
      /* From [rentshearwater.com/] in [/nas/content/live/lautrec2017/wp-content/plugins/wp-google-maps-pro/wp-google-maps-pro.php:7316] */ made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/Avada/100-width.php'), get_footer, locate_template, load_template, require_once('/themes/Avada-Child-Theme/footer.php'), wp_footer, do_action('wp_footer'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, wpgmaps_user_javascript_pro, wpgmza_b_return_dataset_id_array
      [20-Jun-2018 13:01:00 UTC] PHP Notice: Undefined variable: local_id in /nas/content/live/lautrec2017/wp-content/plugins/post-indexer/classes/cron.postindexerrebuild.php on line 215
      [20-Jun-2018 13:01:21 UTC] PHP Notice: Undefined variable: local_id in /nas/content/live/lautrec2017/wp-content/plugins/post-indexer/classes/cron.postindexerrebuild.php on line 215
      [20-Jun-2018 13:01:23 UTC] WordPress database error Table 'wp_lautrec2017.wp_3_wpgmza_datasets' doesn't exist for query
      SELECT *
      FROM wp_3_wpgmza_datasets
      WHERE map_id = '1'
      /* From [rentshearwater.com/] in [/nas/content/live/lautrec2017/wp-content/plugins/wp-google-maps-pro/wp-google-maps-pro.php:7316] */ made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/Avada/100-width.php'), get_footer, locate_template, load_template, require_once('/themes/Avada-Child-Theme/footer.php'), wp_footer, do_action('wp_footer'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, wpgmaps_user_javascript_pro, wpgmza_b_return_dataset_id_array
      [20-Jun-2018 13:04:25 UTC] PHP Notice: Undefined variable: local_id in /nas/content/live/lautrec2017/wp-content/plugins/post-indexer/classes/cron.postindexerrebuild.php on line 215
      [20-Jun-2018 13:04:44 UTC] PHP Notice: Undefined variable: local_id in /nas/content/live/lautrec2017/wp-content/plugins/post-indexer/classes/cron.postindexerrebuild.php on line 215

  • Adam Czajczyk

    Hello Pat

    Thank you for your response.

    Could you please also:

    1. tell me if no posts/pages are being indexed at all or if that's just some specific post type only (e.g. "page" or some custom post type)?

    2. enable support access to the site so I could take a closer look at it? To do this, please go to the "WPMU DEV -> Support" page in your site's Network Admin and click on "Grant support access" button there, then let me know here when it's active.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Pat

    Thank you, support access worked now.

    I checked the site and in "Default post types" option on "Settings -> Post Indexer -> Global Settings" page you had the value of "Pages".

    The "post type" has to be a registered WP post type so if you want to index pages, the valid post type is "page" (hence lowercase as well); for posts that would be "post". I have changed it and then run "rebuild index" option (that should be done after changing post types settings) and it seems to be working fine now.

    If you got to Post Indexer settings now you will see stats and some of the pages already indexed. You might need to give it some time to go through all the sites and all the pages (and it does that on a schedule base - see cron information there) but it should be fine now.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.