Can't get Global Search working

Hi Team WPMUDev.

I have previously had Global Search working perfectly on my site however, after a major redesign that included removing BuddyPress and a heap of other things, I CANNOT get it working again.

I have indexed the site/s multiple times with no result.

At first I thought it may be a conflict with the menuing system I am using (Responsive Menu Pro) but even when I deactivate search there, I still get nothing.

Your help will be appreciated.

I have granted site access.

David Wilks

  • Predrag Dubajic

    Hey David,

    Hope you had a nice weekend :slight_smile:

    I had a look at your site and it seems like the issue is not withing Global Site Search but Post Indexer plugin because it's unable to index your network sites properly.

    I do see some console errors when in admin section that are referring to twitter and facebook so could you try disabling any social plugins you are using or if you've added any code yourself for this social networks try removing them and see if there are stats showing under Settings > Post Indexer panel in your network admin section.

    Let us know how it goes.

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi David,

    Can you try disabling other plugins as well so we can be sure none of your plugins are blocking post indexing?

    If it still doesn't work after that can you try adding below code inside your wp-config.php just above /* That's all, stop editing! Happy blogging. */ line.
    define('PI_CRON_DEBUG', true);

    This will create another tab in post indexer settings that could give us more info about what's going on.

    Best regards,
    Predrag

  • David

    Hi Predrag,

    We already tried adding your code in the wp-config.php and disabled all other plugins, except for the Global Site Search, Post Indexer and WPMU Dashboard, but still woudn't work. See screenshots:

    http://www.screencast.com/t/MubBUvYXAf
    http://www.screencast.com/t/EegmngljlF

    We also tried removing all custom functions in the child theme (functions.php)

    After some further digging, we noticed an anomaly in our wp-config.php network setup entries, particularly the domain name. See http://www.screencast.com/t/FCiEo4H3OSPm

    The wp-config.php shows: define('DOMAIN_CURRENT_SITE', 'theownerbuildernetwork.co'); <--- which is our domain
    WP Network Setup suggests: define('DOMAIN_CURRENT_SITE', 'theownerbuildernetwork.com.au');

    We're not entirely sure how that happened and how and where Wordpress got that but can that explain why the indexer won't work properly? Let me know your thoughts. Thanks!

    Regards,
    David

  • Adam Czajczyk

    Hello David!

    Was the site previously used under the ".com.au" domain?

    It looks like there's some 'leftover" setting and it may be the cause of the issue. However, in order to be absolutely sure about it we would need to sort out that domain issue first :slight_smile:

    That said, please first go to the "Network Admin -> Sites -> All sites" page and click "Edit" link under the main site. Take a look first what the "Site Address (URL)" inside "Info" tab shows and then also review all the fields in the "Settings" tab. Let me know please if you found any traces of that wrong domain there.

    If that doesn't show anything, try this script please:

    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    It's not a WP plugin but a standalone script that you upload to your site (into WP install folder) and run in separate browser window. There's a "dry run" tool that doesn't make any changes to the database but will let you search entire database against that ".com.au" domain, including serialized data in the fields that usually don't show up in an "open text".

    Let me know if you found anything that way, please!

    Best regards,
    Adam

  • David

    Hello Adam,

    Thanks for your suggestions and we certainly did a try on our staging site (an exact copy of the live site) but to no avail. Updated the Post Indexer but still no data shown in statistics or Cron tab.

    The information in the Site Address (URL) and Sites >> Settings is showing the correct URL or domain name, but we still ran the Search/Replace script and uncovered/fixed thousands of left-over URLs from the old domain.

    Moving forward, I was wondering if the Post Indexer can handle a database as big as 1.3 GB? Per checking and considering the number of sub sites we have on the network, that is the actual size of our database.

    Do you guys need access to our staging environment? This is getting a bit urgent and I really do appreciate the assistance. Let me know. Thanks!

    David

  • Adam Czajczyk

    Hello David!

    The Post Indexer plugin should be able to handle that big database and actually even bigger because it doesn't run "in one go" but is triggered by cron and processes data in "chunks". A single "chunk" is not big and can be processed quite easily even on relatively underpowered systems so indexing larger database is no different, except it will just take much longer.

    I think it would be good if we could take a look at your staging setup so if you could grant us a support access to it it would be great. Here's a guide on how to do this:
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    In case we needed more direct access, we'll let you know how to provide us with credentials in a secure way.

    Let me know here after you granted an access please.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello David!

    Thank you for granting access and for this additional information.

    After checking the staging site I'm starting to have doubts about whether it is indeed cron issue or something else. For now, I tend to suspect database related issues but that would need to be checked.

    I'm saying this because I also tried to manually execute Post Indexer tasks using WP Crontrol plugin and even though that plugin confirms that these were executed successfully there's no trace in of that in Post Indexer cron logs, no trace of any activity in stats etc.

    That said, I would like to take much closer look so would you mind if I accessed your site and database directly? To let me do this please send in:

    Subject: "Attn: Adam Czajczyk"

    - Mark to my attention, the subject line should contain only: ATTN: Adam Czajczyk
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - login URL and admin account login credentials (may be a temporary admin account) data
    - Include FTP log-in details (hostname, username & password)
    - Include hosting control panel access details (login address, username & password) - cPanel's usually the control panel used for this, but your provider may use something else; I'll need this for accessing your site's database, preferably via phpMyAdmin
    - Include any relevant URLs for your site

    Please use our contact form here https://premium.wpmudev.org/contact/#i-have-a-different-question

    Please be sure to make a full backup of your entire site first!

    I would then use these credentials to review WP config and debug log, server error log (if there's any), check if all the files are properly installed and also check the database. Hopefully this would let me identify the main culprit and find a solution.

    Just to make sure: that's a staging site so if I had to change anything there's no risk of breaking the live site and loosing important data? If you can confirm that, it would be great :slight_smile:

    Best regards,
    Adam

  • David

    Thanks for looking into it, Adam. I will send you the login credentials but will discuss this first with my developer regarding backing up of our database.

    While the sellmytimeshare.asia is our staging environment of the live site thehomebuildernetwork.co, we try to make it as close as possible (clone) to the live one. Considering its massive database size, performing site restorations is a pain.

    Again, we have no choice but to do what is necessary on the staging, otherwise we're sitting ducks with this Post Indexer. Said functionality is crucial for our members to do searches network-wide.

    Talk again soon.

    Regards,
    David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.