Ross Wintle
Forum Replies Created
-
Weird. A search for the author (“unalignedcoder”) shows it up.
Shonu, Marcus is rewriting the Events Manager plugin so that it will use what’s called a “custom post type”.
This will mean that events will just be a type of post within WordPress.
This change will happen in a future version of the plugin.
Ah, OK. Changing events to posts seems like a really good move (though a lot of work!). Then you don’t need the filter at all, right? 🙂
Oh, and, actually, hooking the filter to the_title isn’t right either. It will replace all titles on an event page with whatever the filter produces.
For me this turns my nav menu into:
Events – Events – Events – Events – Events
Hooking the filter to the ‘single_post_title’ hook seems like a better idea. Put this in your functions instead:
add_filter ( 'single_post_title', 'em_content_page_title',10,1 ); remove_filter ( 'wp_title', 'em_content_page_title',10,1 );Cool – carried discussion over to there. Will set this to resolved.
Aha – found this after creating a new topic at: http://wordpress.org/support/topic/plugin-events-manager-events-manager-wipes-out-wp_title
I don’t know what else Marcus has in the pipeline that might change this, but the fact is that having the EM filter on the wp_title hook interferes with the correct operation of the wp_title function.
wp_title is documented here: http://codex.wordpress.org/Function_Reference/wp_title and it takes two parameters related to a separator.
If I call:
wp_title( '|', true, 'right' )then I should get back:
<Title> |'The filter in EM hooks to the wp_title hook, which is right at the end of the wp_title() function. The EM filter takes the wp_title() output and spits out some new output. HOWEVER…it ignores the separator parameters.
I would therefore argue that if you’re hooking to the wp_title filter hook then your filter needs to observe the separator parameters to preserve the correct functionality of the wp_title() function.
The alternative is to hook the filter in elsewhere. I, personally, think that hooking into the_title and preserving the functionality of wp_title() is the right thing to do, but Marcus is the developer and he knows what’s up his sleeve.
Cool – looking forward to v2.0 then.
For the class bug, the widget appears as:
<li id="wdg_specialrecentposts-3" class="widget-container Special Recent Posts">But
Special Recent Postsis not a valid class name as it contains spaces.I THINK you’re defining this on line 30 of class-widgets.php:
$widget_ops = array ( 'classname' => __('Special Recent Posts', SRP_TRANSLATION_ID), 'description' => __('The Special Recent Posts widget. Drag to configure.', SRP_TRANSLATION_ID) );Probably simply a case of changing the class name.
Thanks
Ross
As a fellow developer, I figure that the easier I make your life the more likely it is I’ll get a quick fix.
Might be wrong about where in the code this is happening, but hopefully you can re-create it easily.
Thanks.
Hi Marcus,
Sorry – dropped the ball on this one.
I’ve just updated to v4.13 and I’m still having this issue.
In fact, I’m logged in as administrator, and, though I have 6 events in the database the edit locations screen is showing me:
My Locations (3) | All Locations (4)
I’ve tracked it down to locations which have no events assigned to them. These are not displayed in the locations list for me, and they are not displayed in the locations list when editing an event if I have the “Use dropdown for locations” option set.
I even tested this by just creating a new location from the locations screen and it didn’t appear in the edit locations list. When I added an event at that location, the location appeared.
This only seems to happen on a multi-site blog (I tested it on a standalone development blog and the problem did not appear).
I had a quick look at the code in classes/em-locations.php – I guess it must be something to do with the “blog id in events table” section of the build_sql_conditions function.
You know the code better than I. Perhaps you could take a look at how the query gets built for a multisite and see if anything is wrong?
Thanks
Hey Marcus, thanks for the quick reply. I’ve updated to 4.0.82 but that’s not fixed things. Not been able to check the dev version – will wait for the next update. Thanks for the fix!
Ross
Forum: Themes and Templates
In reply to: Activating Satoshi front page makes homepage blankI’ve helped out with this – was a problem with incomplete Google Analytics code in the theme options.
Well, I was running on WP3.1.3 but I upgraded EM to 3.0.8 yesterday and that seems to have fixed it.
Thanks for all the hard work getting v4 out and working. Amazing plugin! 🙂
Just tried dev version of 4.0.7 and it’s still ignoring the “Scope” in the queries and displaying all events instead of future events.
Further investigation:
I was using v4.0.4 of the plugin – I’m now back to 4.0.6 and the duplicate scope field in the widget settings has disappeared, but it’s not saving the scope setting, or obeying it in queries – i.e. I’m still seeing past events in event lists (in both pages and widgets!)
Well, OK this has sort-of worked. I’ve got my events back, but the “scope” isn’t quite working – it’s displaying past events where it shouldn’t be.
I dived into the code and it looks like it should be constructing a condition:
elseif ($scope == "future"){ $conditions['scope'] = " event_start_date >= CAST('$today' AS DATE)";But this obviously isn’t happening (I’ll try to do some debugging).
Oddly, my widget now seems to have both a “Scope of the Events” and a “Scope” option – related?