Home › Forums › Calendar Products › Community Events › "Warning" appearing on ADD Form just above Time and Date section
- This topic has 6 replies, 4 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
April 12, 2013 at 11:43 am #45696hbgdioParticipant
Warning: Creating default object from empty value in C:\xampp\htdocs\wordpress\wp-content\plugins\the-events-calendar-community-events\lib\tribe-community-events.class.php on line 2103
April 12, 2013 at 2:08 pm #45712BarryMemberHi hbgdio,
Good catch: I’ll be sure to report that. In the interim I would recommend the first or both of the following:
1. Although a warning correctly makes alarm bells ring in fact in this particular scenario PHP resolves the problem without any need for further intervention, so, certainly on your production or “live” site, all you really need to do is turn off the display of errors – which is a recommended practice in any case.
2. You could put a temporary fix in place quite safely by adding a couple of lines of code within a template override, which I’ll detail below.
Within your theme you would need an events directory, and that would need to contain a community sub-directory. You should then copy to that location the event-form.php template (you can find the original in plugins/the-events-calendar-community-events/views).
Next, please locate the following line of code (around line 102) in your custom copy of :
$this->formEventDetails( $event );
Add some new lines just before it, as follows:
global $post;
if (is_null($post)) $post = new stdClass;Does that help at all?
April 13, 2013 at 1:10 pm #45770punctilioParticipantThere is the same mistake. Fix the template, unfortunately, has not helped.
Warning: Creating default object from empty value in [server]/wp-content/plugins/the-events-calendar-community-events/lib/tribe-community-events.class.php on line 2103
April 13, 2013 at 1:12 pm #45771punctilioParticipantI’m sorry, but the change has helped. I had forgotten to activate the theme right again.
April 15, 2013 at 5:10 am #45827hbgdioParticipantThank you for the quick response. The custom code did the trick. Thanks much.
April 15, 2013 at 2:34 pm #45880BarryMemberExcellent 😀
July 7, 2015 at 6:26 am #978943Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘"Warning" appearing on ADD Form just above Time and Date section’ is closed to new replies.