Home › Forums › MapPress Support › Mashup restriction with Role Scope plugin
- This topic has 8 replies, 4 voices, and was last updated 9 years, 8 months ago by
apart.
-
AuthorPosts
-
April 7, 2013 at 7:52 am #12171
Hello Chris.
I just installed the Role Scope plugin and there is an unknown issue with Mashups. If I am logged in as Admin, then I can see the mashup correctly. If am not logged in at all, then I see the world map with no POIs. However, I can see a single map on the same page correctly regardless if I am logged in or not. I can deactivate Role Scope everything works fine as before.
Do you have any ideas on what role or setting could be causing the mashup to not fire for non logged in users? I couldn’t find any ideas in the support forum. I have also scoured the Role Scope support forum for a solution.
Thanks.
April 10, 2013 at 5:40 am #12196Hi,
I’m sorry, but I don’t know what that plugin does. One thing that might help: you can try running the query in your template, without MapPress. That might help to determine if the role plugin is modifying the query somehow.
Here’s a snippet of PHP that’ll show a query (you can replace it with the query from your mashup):
<?php $wpq = new WP_Query('post_type=post&posts_per_page=-1'); echo print_r($wpq, true); ?>
April 16, 2013 at 10:47 am #12261It happens something similar to me… When I’m logged in as administrator I can see the mashup. When I’m logged in as subscriber I can’t… But I can always see an isolated map… No membership plugins active.
April 16, 2013 at 11:47 am #12262I’ve just checked that, with the PHP query, I get all the data! The mappress mashup only works when I’m logged in as administrator. Doesn’t work when logged in as any other role or not logged in at all… Any help?!…
April 16, 2013 at 12:40 pm #12263@amadex, it’s hard to say without more info, but usually this happens when you’re using draft/private posts that can only be seen while logged in (WP adjusts the query based on your login status).
Probably the easiest thing is to just send me a URL and login, and tell me where to find your mashup.
April 16, 2013 at 9:20 pm #12267Hi Chris, unfortunately I can’t give access to the site at this stage… Is there anything else I can do to find what’s happening? If I do a PHP wpquery the data is obtained (either not logged in, or logged as subscriber). With the mashup, it stays with the “loading” box and nothing happens… Every page and content is published and not private or draft. I don’t know if it is relevante but I’m doing a mashup over a custom post type, containing custom fields and custom taxonomy.
April 17, 2013 at 2:38 am #12271@jeffreygrant Hi, did succeeded in making it work not logged as admin?!…
April 17, 2013 at 9:09 am #12278Hi, I’ve found the problem. I had this in my functions.php:
——————————————————–
add_action( ‘admin_init’, ‘restrict_admin’, 1 );
function restrict_admin() {
if ( ! current_user_can( ‘manage_options’ ) ) {
wp_redirect( site_url() );
exit;
}
}
——————————————————–
Don’t understand why it was interfering with mappress ajax, but this was the cause…
May 30, 2013 at 1:45 am #12717I am just wondering if the original poster ever succeeded in getting this to work. @jeffreygrant?
I am having a similar issue, and have been unable to find a solution. I did some searches for the code that @amadex discovered, but did not find anything.
Thanks for anyone’s help.
-
AuthorPosts
- You must be logged in to reply to this topic.