Post Indexer 3.0 Release Candidate 1

Hi Guys and Gals

We’ve been working away like busy bees recently bringing our post indexer and associated plugins bang up to date. After some internal testing we are delighted to release the first release candidates of the all new post indexer plugin, and the updated associated plugins.

Important

This release candidate is ideally to be used on a development site. If you are currently using our post indexer plugin, then please note – this version uses different tables and database structure so already indexed data will not be brought through to this RC version.

How to get started

Download the post indexer plugin and upload and network activate it on your WordPress Multi-site system.

Go to the Network Admin -> Settings -> Post Indexer page, click on the Rebuild Index tab and then click the Rebuild Index button to get the post indexer to start indexing your sites existing posts.

You can keep track of what is happening with your index on the main Post index statistics page. The index rebuilder uses wp-cron so is reliant on traffic to your site – if you would like to see what the cron is doing then add:

define('PI_CRON_DEBUG', true);

to your wp-config.php file. This will add a Cron Log tab to your post indexer settings page.

You can then upload and activate any of the other associated plugins you want to use.

Global Settings

The main settings are in the Network Admin -> Settings -> Post Indexer area, here you can control the general / global settings for the plugin.

Site by site options

For site by site settings and information you should visit the Network Admin -> Sites page. Here you can see the post types that are being indexed for each site, and can disable indexing on specific sites, change the settings on a site by site basis (pick the post types you want to index), rebuild the index for an individual site and view site by site statistics.

We hope you find this update useful, and please let us know if you run into any issues.

Note: All associated plugins except for global site search and global site tags are attached below – I’ll add these very shortly.

  • Barry
    • DEV MAN’s Mascot

    Is the best way to do that with switch_to_blog?

    No, you’d need to edit the themes code and switch out the standard WP loop for the new Post indexer loop – changing all the function calls to the network loop equivalent (all the functions that you can / would swap are in the includes/functions.php file in the post-indexer directory) – it’s not an easy switch, but is a lot easier with this version of post indexer as all our associated plugins use the new loop / functions internally – so everything that’s needed is there.

  • Barry
    • DEV MAN’s Mascot

    @wotacharlie – easiest way to get an idea of what I mean is to open the tag feed plugin (linked above) and look at the code in there – it shows the loop and the functions you’ll need to use – it’s very much like the standard WP loop but with slightly different (network_ prefixed) functions.

  • Barry
    • DEV MAN’s Mascot

    Will it include the ability to display directory posts, events, from other network sites too?

    You can specify on a global or site by site basis what post types you want to index. The new plugin pulls in all the post meta information for each imported post and provides functions to enable them to be easily pulled out for plugins / themes as well.

  • johnnymestizo
    • HummingBird

    How about revamping the ‘Search’ plugin for a WPMU network.

    If it could search CPT’s and Buddypress elements (activity, groups, members, forums (bbpress i think)) and of course network blogs – that would solve so many problems…!!!

    I take it Ve will have to update Google Maps for the new version of post indexer – which would then possibly fix the issue above…

    Let me know if that is correct and if the Useful Search feature is happening..

    Thanks so much for working on this system plugin! Backend improvements are means less headaches !

    Cheers,

    Johnny

  • Barry
    • DEV MAN’s Mascot

    The new global site search plugin will be able to search CPT’s as well as standard posts and pages that are indexed. If the Google Maps plugin is storing the map data in the post meta table, then the indexer will already be pulling it through to the network index, then it’s just a matter of using the new functions to pull that info out on your theme.

  • Barry
    • DEV MAN’s Mascot

    How about Buddypress activity and Buddypress forums

    At the moment it only indexes the post related wordpress tables (posts and postmeta) as it’s a “post indexer” :slight_smile: There will be hooks and actions in the final release which will allow us to develop add-ons to include other tables, but that will be in later additions.

  • jakelisby
    • Design Lord, Child of Thor

    Also, I assume you’re giving this out to beta test. So here’s a couple PHP error/warnings that are coming through in my logs after installing the new plugin…

    [Thu Nov 29 20:24:43 2012] [error] [client 75.87.116.40] PHP Warning: Invalid argument supplied for foreach() in /nas/wp/www/cluster-1398/sandboxdewsly/wp-content/plugins/post-indexer/classes/class.postindexeradmin.php on line 634, referer: http://sandboxdewsly.com/wp-admin/network/settings.php?page=postindexer&tab=globaloptions

    [Thu Nov 29 20:24:43 2012] [error] [client 75.87.116.40] PHP Warning: array_values() expects parameter 1 to be array, null given in /nas/wp/www/cluster-1398/sandboxdewsly/wp-content/plugins/post-indexer/classes/class.postindexeradmin.php on line 638, referer: http://sandboxdewsly.com/wp-admin/network/settings.php?page=postindexer&tab=globaloptions

  • Barry
    • DEV MAN’s Mascot

    new global tags and posts feed php files in the wp-content folder accessing

    You don’t need to move those anymore – you need to activate them in the Plugins page – that’s one of the big changes, making the plugins easier to install without messing around with file movements.

  • johnnymestizo
    • HummingBird

    I am keen to see this in production! How many bugs do you think are left @Barry?

    Would it be a good idea to make the extra plugins, be sub-plugins on the indexer settings page? (kinda like google maps and events has sub-plugins within the settings)

    This allows us to switch on and off the functionality as required without uploading/downloading.

    Any +1’s ?

    Cheers,

    Johnny

  • jakelisby
    • Design Lord, Child of Thor

    I’m for sure a +1 there. Having feature switching capabilities would be beautiful, but I’d settle for a clear work around to get it added manually in the short term. With demanding clients, whichever route is fastest is my short-term ideal…

  • johnnymestizo
    • HummingBird

    Also, is it possible to:

    – Display on the main site all network site posts of the directory custom post type?

    – “” events

    – Are you able to grab the geo-tag data from the google maps plugin buddypress activity feature ?

    – Can we display results by locality?

    – Can I display the latest posts from site X on site Y ?

    – Can we display network wide activity via a keyword query?

    – Do you think the network-wide search sub-plugin will be absolutely killer now?

    Cheers,

    Johnny

  • Barry
    • DEV MAN’s Mascot

    Couldn’t you just hook into the loop and rewrite the query in functions.php of your theme?

    You could – not sure how much work it would take as you’d have to remove any actions / filters from all the loop hooks first that could mess up the query you were building. We built a network specific loop based on the standard WP loop, that uses similar syntax / hooks / filters / functions (but prefixed with network_ ) so nothing else will mess with it other than code that understands the network side of things.

    It should be simple enough to switch from using the standard loop to use the network one – and it’s certainly one of the things I’m trying to make as easy as possible as I need that functionality for my own projects – so I will be detailing how to do it once I’ve completed the process myself :slight_smile:

  • HamRadioDude
    • HummingBird

    I network activated and got these errors before reindexing and after network activating and going to setting page

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/XXXXXX/public_html/wp-content/plugins/post-indexer/classes/class.model.php on line 703 and defined in /home/XXXXXX/public_html/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/XXXXXX/public_html/wp-content/plugins/post-indexer/classes/class.model.php on line 719 and defined in /home/XXXXXX/public_html/wp-includes/wp-db.php on line 990

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/XXXXXX/public_html/wp-content/plugins/post-indexer/classes/class.model.php on line 722 and defined in /home/XXXXXX/public_html/wp-includes/wp-db.php on line 990

    EDITED: searched and found this But I guess your guys / Gays already know this :>

    http://make.wordpress.org/core/2012/12/12/php-warning-missing-argument-2-for-wpdb-prepare/

  • inarte
    • Site Builder, Child of Zeus

    Hello to all,

    I installed the plugin (3.0 Rc1) but I still can not find

    the products published on marketpress

    The plugin has indexed them (see attached) but the Global Site Search widget with the search does not find them.

    I entered under "Global Settings" post, product (see second attachment)

    How do I find products in global research?

    Thank you …

  • Barry
    • DEV MAN’s Mascot

    The plugin has indexed them (see attached) but the Global Site Search widget with the search does not find them.

    That’s for the release we make just after the initial post indexer release – if that makes sense :slight_smile:

    The initial release of the plugins (other than the post indexer one) will mirror the functionality of the existing plugins but using the new backend, then we’ll add in the extra functionality.

  • Barry
    • DEV MAN’s Mascot

    I did not understand … I can not find the products (marketpress) with Global Site Search?

    @inarte – global site search isn’t one of the plugins available for download above – https://premium.wpmudev.org/forums/topic/post-indexer-30-release-candidate-1

    Therefore it isn’t one of the plugins that is using the new post indexers data, and so it won’t be finding any of the content indexed by the new post indexer.

    I’ll be releasing all the plugins very soon (just need to fix a couple of issues testers found) and then they’ll all be using the new post indexer.

  • johnnymestizo
    • HummingBird

    @Barry awesome news!

    I’ve been looking forward to a decent search box that can find results from:

    – Buddypress activity

    – Events

    – Products

    – Listings

    – Search for any results within a given location using Ve’s geolocation tagging feature.

    – Network sites

    Will these be released as little sub-plugins?

    Cheers

    Johnny

  • johnnymestizo
    • HummingBird

    Whoops. I accidentally activated the 3rc1 plugin with the plugin folder name of post-indexer-3rc1 instead of post-indexer.

    I deact and renamed the folder to post-indexer.

    Now it triggers a fatal error when trying to activate.

    So I am running it in a folder called /plugins/post-indexer-3rc1

    ======

    Rebuilding my index now…

  • Barry
    • DEV MAN’s Mascot

    @johnnymestizo

    So I am running it in a folder called /plugins/post-indexer-rc1

    That’ll cause issues loading the javascript and css styles

    Do you want to let me know what the fatal error was? If you have the other version already installed then you’ll need to remove it.

    Hoping to have all the plugins released this week, assuming nothing major comes up.

  • johnnymestizo
    • HummingBird

    After naming the folder to post-indexer and trying to activate I get this:

    Warning: require_once(includes/config.php): failed to open stream: No such file or directory in /my_wp_install/wp-content/plugins/post-indexer-3rc1/post-indexer.php on line 30 Fatal error: require_once(): Failed opening required 'includes/config.php' (include_path='/my_wp_install/wp-content/plugins/appointments/includes/gcal:.:/usr/share/pear:/usr/share/php') in /srv/www/tradr.com/wp-content/plugins/post-indexer-3rc1/post-indexer.php on line 30

    It seems to work fine when changed back to the post-indexer-3rc1 and activated then. (the folder name of when I first activated it)

    Also, I will be testing the following post types:

    directory_listing

    page

    post

    product

    incsub_event

    question

    Let me know if there are any dramas with them…

    Cheers,

    Johnny

  • Barry
    • DEV MAN’s Mascot

    /my_wp_install/wp-content/plugins/post-indexer-3rc1/post-indexer.php

    You sure you’re renaming it? The error says that it is coming from the post-indexer-3rc1 directory.

    Can you also make sure all the files are uploaded? The error says it can’t find the config.php file in the includes directory

  • Barry
    • DEV MAN’s Mascot

    Ok, lost now

    I deact and renamed the folder to post-indexer.

    Now it triggers a fatal error when trying to activate.

    Thought you said you got a fatal error when you renamed the folder to post-indexer, but that error is not from a directory called post-indexer.

    You should definitely call the directory post-indexer as that is what the plugin uses to load all the css and js, and also make sure all the folders and directories exist as it’s not finding the config.php file – which is a major issue.

  • johnnymestizo
    • HummingBird

    All files uploaded.

    Deactivated and removed indexer 2.1 folder

    Activated 3 rc 1 from the folder post-indexer-3rc1

    All good.

    Realised I should deactivate and change to post-indexer

    Deact

    Renamed

    Activated from post-indexer folder and triggered a fatal error. Saying the files are no longer in the 3rc1 folder (obviously – as I just changed it to post-indexer)

    Is the initial install directory being stored somewhere?

    Cheers

    Johnny

  • Barry
    • DEV MAN’s Mascot

    Is the initial install directory being stored somewhere?

    No, only by wordpress which will pop up a red warning that the plugin can’t be found and will be deactivated – you should see this when you are on the plugins page.

    Saying the files are no longer in the 3rc1 folder (obviously – as I just changed it to post-indexer)

    Do you have the exact wording so I can see if I can it out :slight_smile:

  • johnnymestizo
    • HummingBird

    As per above:

    Warning: require_once(includes/config.php): failed to open stream: No such file or directory in /my_wp_install/wp-content/plugins/post-indexer-3rc1/post-indexer.php on line 30 Fatal error: require_once(): Failed opening required 'includes/config.php' (include_path='/my_wp_install/wp-content/plugins/appointments/includes/gcal:.:/usr/share/pear:/usr/share/php') in /srv/www/tradr.com/wp-content/plugins/post-indexer-3rc1/post-indexer.php on line 30

    For some reason after deact, changing folder name, and react it still looks at the old directory…

    Anyways, it seems to be running fine from 3rc1 folder for now. I will keep testing…

    So looking forward to one day having epic network-wide site searches from all custom post types and buddypress activity!! :slight_smile:

    Thanks

  • Barry
    • DEV MAN’s Mascot

    As above – that error says that you are running it in post-indexer-3rc1, so not 100% sure what you are doing, but the fact that you are getting that error says that the file post-indexer.php still exists in that directory as it is erroring on line 30 (which it wouldn’t if you had removed or deleted that directory and its files).

  • stergatu
    • Site Builder, Child of Zeus

    Hi, Barry,

    Do you have a release candidate which we can try out?

    We are currently update our multisite installation on a developent server and it would be great if we can use the new version of post indexer.

    Thanks in advance

    Lena

  • ivn
    • The Crimson Coder

    I tested it on my network.

    Indexed a total of 520,122 posts flawlessly.

    Let me know if I can help in testing anyway, I’d like to know if post voting works with this.

    Chart Problem:

    One thing I noticed was the graph doesn’t make sense when you have more than 12 sites.

  • Barry
    • DEV MAN’s Mascot

    One thing I noticed was the graph doesn’t make sense when you have more than 12 sites.

    Can you pop up a screenshot? The charts will be improved as we go along, if there is anything you want to see on them then let me know as I want the dashboard to be as useful as possible.

    Is it possible for site admin to opt out of being indexed.. maybe per category, taxonomy, or post type?

    Not sure what you mean by site admin – do you mean not indexing posts by specific users?

  • thorstone137
    • Flash Drive

    Not sure what you mean by site admin – do you mean not indexing posts by specific users?

    In a network environment where the network admin is indexing all the sites in the network would it be possible to allow a site admin to prevent their site from being indexed if they wanted..

    Giving users that option would be cool too.. it could be a Pro Sites addon..

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.