@cfatiuk, have you tried this on the default WP theme to see if it works there?
I have exactly the same problem, even when i switch back to twentytwelve i get the php warning.
i found out two things while figuring what was going wrong. first, i created a taxonomy-event-categories.php to do som special formating, still either php warning and some formating or no warning but then not formating 🙁
i followed all advice here, plugins off, switch them, make a lot of extra pages, used all templates in every possible order, still no luck.
i even went to the function in em-category-taxonomy -> function template($template)
and tried die(var_dump($template));
when i get the php warning $template is an empty string, when i get no warning, the template() function never runs
i could give more debug if somebody tells my what to do…
where exactly do you do die(… ?
I can’t reproduce this error
function template($template){
die(var_dump($template));
global $wp_query, $EM_Category, $em_category_id;
right there …
give me some hints what you need to debug and i will do
I’m not sure where to start…. in that case WP is already not giving us a template, meaning there’s something outside this function probably causing the problem. we don’t even have the chance to mess with templates or wp_query at that point.
what page exactly do you see this error? a single category page?
i created a file called ‘taxonomy-event-categories.php’ in my theme root same as ‘single-event.php’ for some theming reasons (i used to use simple-fields plugin to do some theming)
when my theme is rnning the taxonomy-event-categories.php, i dont get the object error but strangly, em-theming is not working… it just drops an unstyle eventlist:
Freitag, 8. März 2013 - Sonntag, 10. März 2013
16:00 - 18:00 Orality in James Joyce Conference
Arts Millenium Building, Galway Galway Freitag, 29. März 2013
20:00 - 22:00 Traditional music session
The Crane Bar, Galway Galway Samstag, 1. März 2014
22:00 - 23:00 6 Nations, Italy VS Ireland
Taaffes Bar, Galway Galway
when i rename the file, i get this error (with wp debug enabled):
Warning: Creating default object from empty value in /wordpress/wp-content/plugins/events-manager/classes/em-category-taxonomy.php on line 22
Notice: Undefined property: stdClass::$ID in /wordpress/wp-includes/query.php on line 3385
but the em-theming is working at that point, but doing something strange in the loop. when i enabled the custom fields via simple-fields it was replacing all my content (even the custom vars) with the em-loop
i dont need the category page, so my dirty workaround is avoiding the category links everywhere…
Hi @scharc,
could it be a plugin conflict cause by simple-fields plugin? and if you rename your custom taxonomy template this plugin search for it? it is possible to temporarily disable this plugin just to narrow down the problem?
@agelonwl the only plugin running right now is em.
i still get the
Warning: Creating default object from empty value in /wordpress/wp-content/plugins/events-manager/classes/em-category-taxonomy.php on line 22
when there is no file called: taxonomy-event-categories.php
when there is a file called taxonomy-event-categories.php the warning is gone but no em-themed event list
i could come to any irc channel to talk more about that problem, if neccessary
i think taxonomy-event-categories.php overrides our themeing structure, so you’d need to run something like
EM_Category_Taxonomy::content();
on that custom template instead of using normal WP methods.
if you have a screenshot of your categories settings in the ‘Pages’ tab that may help
here you go:
View post on imgur.com
german, i hope you dont mind
odd, but I don’t get this problem, using the same settings.
did you try my suggestion above?
nope because i am not sure how to use it in my custom-tax-**.php
anyways, i will not use categories in my site and activly prefent users to get there (header()-redirect )
Hi –
Am wondering if any further progress has been made in resolving this issue?
I too am experiencing difficulties in listing events within a specific category without the following error message being displayed –
Warning: Creating default object from empty value in /homepages/46/d460955225/htdocs/International_Legal_English/wp-content/plugins/events-manager/classes/em-category-taxonomy.php on line 22
Am presently in the process of fleshing my site out with content, during the course of which I intend to upgrade to the PRO version of the software, and it would be great if I was able to list events by category, as the plugin is otherwise absolutely ideal for my purposes.
P.S. Would be more than happy to make the contents of my site (as they presently stand) available for inspection/experimentation, if this might help to get to the bottom of the problem.
Rather oddly, I have this problem in one of three copies of a site I’m testing. They’re on different servers, so I’m busy trying to determine whether there are any server settings that might cause one to throw the warning while the other two do not. (Edit: Yes, the server showing the message is set to display errors, and the others were not. The warning is displayed on all three now that I’ve alogned their settings more closely.)
I do have a plugin active that adds custom attributes to posts, including custom post types like events and locations, and initially I wondered whether the non-EM custom attributes were giving EM a problem…
I notice this thread is marked as resolved, but I’m coming up with the same problem in WP 3.6, in all themes and with only EM enabled. It only occurs on single category or tag pages. Does anyone have any ideas?
Cheers,
James