namwen
Forum Replies Created
-
Making some progress:
I’ve been digging through the class files trying to figure out where the issue is occurring and I’ve tracked it down to this chunk of code inside the output function in the EM_Events class :}else{ //Firstly, let's check for a limit/offset here, because if there is we need to remove it and manually do this $args = apply_filters('em_events_output_args', self::get_default_search($args) ); $limit = ( !empty($args['limit']) && is_numeric($args['limit']) ) ? $args['limit']:false; $offset = ( !empty($args['offset']) && is_numeric($args['offset']) ) ? $args['offset']:0; $page = ( !empty($args['page']) && is_numeric($args['page']) ) ? $args['page']:$page; $args_count = $args; $args_count['limit'] = false; $args_count['offset'] = false; $args_count['page'] = false; $events_count = self::count($args_count); $events = self::get( $args ); }
I noticed though that if I specify the event owner in the arguments to 1 or false, I will receive those arguments no problem. This may work so long as I’m receiving all events that exist and not just events created by the administrator.
It seems like the function doesn’t have permission to execute from functions.php when a non-privileged user fires it. The function is obviously executing just fine as it doesn’t throw an error, but the results it’s returning are empty. That tells me that it’s an issue with the permissions of the Event post-type.
Any idea if it’s possible that WordPress is blocking the function from accessing the events?Yeah, I’m using both hooks. Which is what’s so strange really, seeing that all the other functions that are hooking in have no problems, logged in or out.
I should also note that I can see the events just fine on my desktop theme which is set up through the page feature of Events Manager, rather than a custom function. The custom function I’m using hooks into the WordPress wp_ajax_nopriv ; I wonder if that has something to do with it.
I’m actually 99% sure the issue isn’t related to the iPhone but is instead a permissions issue. I wasn’t logged in when using the phone and when I logged in they appeared. Then I logged out on the desktop and they disappeared.
I’ve gone through every setting in EM that could possibly be related to post permissions and haven’t found anything. I’ve checked the formatting options and there’s nothing there that would display posts based on someone logged in or out.
I’ve made new posts, changed the permissions on them back and forth and still can’t figure this out.
Nope. Still nothing. My Events aren’t being displayed on a page anywhere; I’m just grabbing them through the EM_Events::output function and displaying them with javascript. It definitely seems to me like It’s just a simple setting somewhere that we’re missing…
Yep, I can see single events on their own just fine.
Events manager is the only active plugin. I was using a theme switcher to use the mobile theme for mobile devices, but I deactivated that and I’m using only the mobile theme right now.
I’m really at a loss here. What’s strange is that the plugin itself is working fine with my javascript and php. The ajax sends the request, the php performs the action, and the javascript is returned a value. But the value of course is “no events”. So somewhere along the way, Events Manager is getting confused and not finding any of the events.EDIT:
Ok, I just realized it’s a permission issue. I’ve been logged in on the desktop ( where I can see the events ) , and not on the mobile. I can’t figure out where in the settings I make all events visible? They’re all set to public in the post editor.
Yeah, as I said, the events are returned when I’m using a desktop browser. It’s when I’m viewing the site through mobile Safari that I get the no events error.
It’s most likely not an issue with the plugin. In my case it turned out to be a blacklisted IP address – client with a weak password was compromised and began sending out massive amounts of spam. The IP was blocked and couldn’t perform any outgoing transmissions.
So, as Ross said to me above, check to see if your server is capable of sending anything out by checking the blog on the dashboard, or try searching for plugins through the new plugin page.Yeah, turned out to be a server issue. Thanks for the help and for the plugin.
Nope. Same error message. The other thing is that the page itself takes noticeably longer to load when the plugin is active on it. However, I’m suspecting the issue is actually server related and not being caused by the plugin. On a different server with an exact copy of the site, the plugin works just fine.
Thanks