Google Maps Plugin - Network True, Query All Issue

Hi,

The query all works for all posts on the local blog.

The network true and query="tag=xyz" works network wide.

But, the query="all" and network="true" does not work. It simply displays the map with no posts or markers. (even when you set show_markers="true" and show_posts="true")

Johnny

  • johnnymestizo
    • HummingBird

    Yes. Indexer is installed.

    I am running it in shortcode:

    [map query="tag=sydney" network="true" overlay="true" show_images="false" show_markers="true" show_posts="true" height="1000px" width="100%" zoom="15"]

    Does not load anything, even though I have created several 'sydney' tagged posts on multiple blogs.

    [map query="tag=cronulla" network="true" overlay="true" show_images="false" show_markers="true" show_posts="true" height="1000px" width="100%" zoom="15"]

    'cronulla' tagged posts seem to be loading fine.

    There seem to be a problem with how wpmudev maps is interfacing with indexer.

    Any ideas?

    John

  • Mason
    • DEV MAN’s Sidekick

    This is happening even when you're doing query=all, correct?

    So the network-wide component doesn't seem to be playing nice with Google Maps - regardless of whether or not you're using tags.

    Does any map display at all? I'm testing this now and on one site I'm seeing the it's pulling maps from the main site, but not a sub-site map.

    Let's check in your wp_site_posts table and make sure the map posts are being indexed there (they are on my install) and then we can narrow this down specifically to Google Maps.

    I'm also pinging the developer to take a look here as well.

    Thanks!

  • Vladislav
    • Dead Eye Dev

    Hi,

    Unfortunately, in current plugin version network queries are limited to querying by tag. I agree that this is a pretty big limitation, and we'll be working on removing it in further versions (starting with "all").

    As for querying by tag issue you're experiencing, have you added tag "sydney" to your posts after they've already been published? If so, changes to their tags most likely haven't been picked up by post indexer. To make sure, you can try creating a new post, associate a map with it and add it the tag "sydney", all before you publish it.

    If your network shortcode that queries the tag "sydney" doesn't start working after that, can you please take a look at your database tables named "wp_site_terms" and "wp_site_posts" to make sure your posts are stored there and properly mapped to their tags?

  • johnnymestizo
    • HummingBird

    Hi,

    Did some quick tests:

    Creating a new post with Sydney tag and map associated then saving as draft, then publishing - Failed

    Creating a new post with Sydney tag and map associated then publishing - Failed

    I have a theme that is customised to scan for 'Sydney' tagged posts
    http://sydney.tradr.com.au

    The exact same theme also scans for 'Cronulla' tagged posts
    http://cronulla.tradr.com.au

    You can refer to the sydney site, it will notify when this issue is resolved and the map loads.

    It seems, it could be any new posts are simply not being indexed.

    I will check the database shortly in regards to the wp_site_terms and wp_site_posts tables.

    Cheers

    John

  • johnnymestizo
    • HummingBird

    select * from wp_site_terms;

    | 682 | Sydney | sydney-auctions-ending-now-deals | category | 0 |
    | 683 | Gun Surfboard | gun-surfboard | category | 0 |
    | 684 | sydney | sydney-2 | post_tag | 0 |
    | 685 | Brisbane | brisbane | category | 0 |
    | 686 | Queensland | queensland | category | 0 |
    +---------+------------------------------------------+------------------------------------------+----------+-------+
    686 rows in set (0.00 sec)

    select * from wp_site_posts;

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------+-----------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+----------------------+---------------------+---------------------+-----------+
    463 rows in set (0.03 sec)

    The above was a massive amount of data, more than my terminal could handle.

    I have used an application in the past where it took care of ssh connection to server, then you could enter the mysql login details as well. And all would display in a nice GUI. Anyone know what is was called?

    Not sure if the terms are in any chronological order, as the gun-surfboard post is very old.

    There is stuff in the above tables, I just have no idea how to find out how recent it is.

    It would be great if we could hit a button and re-index the whole WPMU install, and to confirm it is installed properly.

    At least that would stop people of having to get into their mysql database, and reinforce that the indexer plugin is working correctly.

    Any ideas?

    Johnny

  • Mason
    • DEV MAN’s Sidekick

    On the mac, I use Sequel Pro for a pretty GUI app with MySQL. Otherwise, it's phpmyadmin for me as well.

    Does appear to be a tag issue on your site johnny. It'd be really helpful if we could see what's in the database.

    I agree, it'd be cool to 'rescan' the database and get a new index of posts. That could be crazy intensive depending on the site though, and isn't what Post Indexer is meant to do.

  • Vladislav
    • Dead Eye Dev

    Hi,

    While lacking a GUI can be pretty annoying when working with MySQL, running these two queries one after another will find the info we need. First, take a look at your tag in WordPress and make a note of its' slug - we'll be using that to construct our first query:

    SELECT term_id FROM wp_site_terms WHERE slug='sydney'

    (Here I'm assuming your tag slug is "sydney", but you can change it to whatever you want). This query should return only one result, which will be a number. Let's say it returned "222". We will be using that to construct our next query:

    SELECT * FROM wp_site_posts WHERE post_terms LIKE '%|222|%'

    (You should, of course, replace 222 with whatever the result was in your first query). This will return a list of posts that post indexer recognized as being tagged with "sydney" tag, if any.

  • johnnymestizo
    • HummingBird

    mysql> SELECT term_id FROM wp_site_terms WHERE slug='sydney'
    -> ;
    +---------+
    | term_id |
    +---------+
    | 604 |
    +---------+
    1 row in set (0.00 sec)

    mysql> SELECT term_id FROM wp_site_terms WHERE slug='Sydney';
    +---------+
    | term_id |
    +---------+
    | 604 |
    +---------+
    1 row in set (0.00 sec)

    mysql>

  • Vladislav
    • Dead Eye Dev

    Awesome, thanks for that. This means that the tag exist in Post Indexer tag table. Now, to see if any posts are actually tagged by that in Post Indexer, can you please run this query against your database:

    SELECT * FROM wp_site_posts WHERE post_terms LIKE '%|604|%'

  • johnnymestizo
    • HummingBird

    mysql> SELECT * FROM wp_site_posts WHERE post_terms LIKE '%|604|%';
    +--------------+-

    blah blah content of posts

    ----------------+---------------------+---------------------+-----------+
    16 rows in set (0.00 sec)

    mysql>

    So, according to above there are 16 Sydney posts. When I specify Sydney or sydney, i get no map.

    Johnny

  • johnnymestizo
    • HummingBird

    mysql> SELECT term_id FROM wp_site_terms WHERE slug='cronulla';
    +---------+
    | term_id |
    +---------+
    | 658 |
    +---------+
    1 row in set (0.00 sec)

    mysql> SELECT * FROM wp_site_posts WHERE post_terms LIKE '%|658|%';
    5 rows in set (0.00 sec)

    This map works however.

    Any ideas?

    Johnny

  • Vladislav
    • Dead Eye Dev

    I'm still not sure which one it is - I have just tried with a lot of different network tags on test installs, and I was still unable to recreate the issue.

    There is another thing that got me thinking - from your previous posts (and thank you very much for such detailed feedback), it appears you have at least two tags named Sydney:

    id: 684, Name: sydney, Slug: sydney-2
    id: 604, Name: (I'm not sure), Slug: sydney

    Are your posts that have maps associated with them are all tagged with the same tag (slug should be either "sydney" or "sydney-2", or something else, but consistent across posts)? Is it possible that posts whose tag has slug "sydney" aren't associated with maps?

  • johnnymestizo
    • HummingBird

    hiya

    Been poking around,

    On a blog I have 3 posts associated to its sydney map

    Associate map with this post
    Associating a map with a post allows for using this map in advanced ways - to show it dynamically in the sidebar widget, or in an advanced mashup
    This post is already associated with these
    Used Bench Press in Sydney
    Olympic Weight Plates for Sale in Sydney
    Sydney Olympic Bar Collars

    Map size

    I have hovered over the tags for each post and they say this:
    http://gym.tradr.com.au/wp-admin/edit.php?post_type=post&tag=sydney

    It appears as all posts on gym.tradr.com.au for 'Sydney' are not being indexed.

    Any ideas?

    Johnny

  • johnnymestizo
    • HummingBird

    I tried running a map for ''Sydney-2''

    It only has one post from another blog.

    I went to the same blog. Deleted the Sydney category. Deleted the sydney-2 tag.

    Created a new sydney tag.

    Removed map association. Reassociated. Resaved the post.

    Still does not call from the Sydney.tradr.com.au blog.

    Any ideas? I still think a re-index option is necessary.

    Cheers,

    Johnny

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.