Home › Forums › Calendar Products › Events Calendar PRO › strtotime() expects parameter 1 to be string
- This topic has 12 replies, 3 voices, and was last updated 8 years, 3 months ago by
Zoe.
-
AuthorPosts
-
December 19, 2016 at 5:52 pm #1207969
Zoe
ParticipantFirst error I was getting:
PHP Fatal error: Call to undefined function tribe_events_single_event_meta() in /home1/poutousc/public_html/thexfitpro/wp-content/themes/jumpstart-child/tribe-events/single-event.php on line 63
Below is what it WAS (see line 63)
`<!– Event meta –>
62 <?php do_action( ‘tribe_events_single_event_before_the_meta’ ) ?>
63 <?php echo tribe_events_single_event_meta() ?>
64 <?php do_action( ‘tribe_events_single_event_after_the_meta’ ) ?>`I made this edit per something I read on this forum. This is to a copy of single-event.php in my child theme.
<!-- Event meta --> <?php do_action( 'tribe_events_single_event_before_the_meta' ) ?> <?php echo tribe_get_template_part( 'modules/meta' ); ?> <?php do_action( 'tribe_events_single_event_after_the_meta' ) ?>and NOW I am getting this error:
PHP Warning: strtotime() expects parameter 1 to be string, array given in /home1/poutousc/public_html/thexfitpro/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 969I wias unable to attach 2 php files in my second reply. If you need themI am happy to attach. Thank you for all your help
Zoe
December 19, 2016 at 10:41 pm #1208033Cliff
MemberHi, Zoe. Sorry you’re experiencing this, and thanks for these details.
You are correct that our forums do not allow uploading of PHP files.
So if you switch to a WordPress default theme like Twenty Sixteen or Twenty Seventeen (and do NOT have any template overrides for our plugin in place) does this issue still happen?
If yes, please provide me the steps I can take on my local testing site to see if I can recreate the issue.
If no, please check with your theme author to see about obtaining the latest version of their theme (that hopefully isn’t throwing any WP_DEBUG errors).
December 21, 2016 at 12:51 pm #1209108Zoe
ParticipantHi Cliff,
I do have the most recent theme. and this is a premium theme I am using with a reputable author, if that helps.
I can’t really switch to any WordPress default theme..that would completely change the customer interface of the site. The switch would have to be up for awhile to see if that still generates the errors I am seeing.
What else can I do?
Thank you,
Zoe-
This reply was modified 9 years, 4 months ago by
Zoe.
December 21, 2016 at 2:21 pm #1209168Cliff
MemberIf you could tell me the steps to replicate this — what screens and actions to take to throw this WP_DEBUG message — I might be able to confirm this bug for you without you having to do any further testing.
December 21, 2016 at 9:28 pm #1209305Zoe
ParticipantHi Cliff,
I set up the calendar to display on the website indicated, I set up recurring events. One day I thought to take a look at the error log in the root of my site, and I saw that daily these errors were being generated. So the steps I took to get the errors to appear where the same steps I took to simply set up events and have them display.
I am not sure what to do to have you see what the cause of this error is. I am concerned about this error and that it is slowing down the site.
What can we do from here?
Thank you,
ZoeDecember 22, 2016 at 7:56 am #1209469Cliff
MemberYour concern is warranted. It’s definitely something to work toward resolving.
However, I haven’t seen this issue and I haven’t seen any other users report it either.
Please enable WP_DEBUG and WP_DEBUG_LOG and share any debug messages you see while navigating your site’s home page, events page, single-event pages, creating an event, creating a recurring event, editing an event, and any other of your site’s pages relevant to this ticket.
The best way to figure out what’s triggering the error is to enable WP_DEBUG and WP_DEBUG_LOG and then watch for the /wp-content/debug.log file to be created (will be after the first error is added) — you might need to refresh your SFTP program to detect if it got created.
Then don’t test anymore until you can do that same action to throw that same error a 2nd time.
Then report that to me, delete the debug.log file, then do other actions to test for more errors created by taking other actions on your site.
I hope that makes sense and helps us move forward with this troubleshooting.
January 4, 2017 at 11:04 am #1213360Zoe
ParticipantHi Cliff,
I was out of town on holiday travels,and I am back now.I wanted to repsond to you to keep this thread going.
I just logged inot the ftp and this error is still happening:[03-Jan-2017 22:14:22 UTC] PHP Warning: strtotime() expects parameter 1 to be string, array given in /home1/poutousc/public_html/thexfitpro/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 969SO!: I will enable this wp-debug you mention, and let you know what happens.
Many Thanks,
Zoe
January 4, 2017 at 10:46 pm #1213628Cliff
MemberAnother thing you might try is adding
var_dump( $meta['exclusions'] );before Line 986 of /wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php and see if it outputs anything for you while doing your testing.
If it does, please send a screenshot or copy the contents for me to take a closer look at.
Thanks!
January 9, 2017 at 3:43 pm #1215400Zoe
ParticipantHi Cliff,
I am returned from Holiday travels!I enabled debug mode (never done that before.) Nothing displayed. I did this in a variety of ways (after some internet research) and never got anything to appear.
I entered the test you suggested like this:
// return $meta['exclusions']; var_dump( $meta['exclusions'] ); }return $meta[‘exclusions’]; was already there, so I commented it out.
HOWEVER, I still have this error log that displays errors generated daily:Meta.php on line 969 [08-Jan-2017 22:00:14 UTC] PHP Warning: strtotime() expects parameter 1 to be string, array given in /home1/poutousc/public_html/thexfitpro/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 969 [08-Jan-2017 22:00:14 UTC] PHP Warning: strtotime() expects parameter 1 to be string, array given in /home1/poutousc/public_html/thexfitpro/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 969 [09-Jan-2017 21:49:00 UTC] PHP Warning: strtotime() expects parameter 1 to be string, array given in /home1/poutousc/public_html/thexfitpro/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 969Could this error be occurring because of not setting up an event correctly?
Thank you,
Zoe
January 10, 2017 at 7:43 am #1215792Cliff
MemberI had one of our developers take a look at all our messages and here’s what we’re thinking:
It seems the source of the error is Tribe__Events__Pro__Recurrence__Meta::save_pending_events(), but it seems odd this would ever be called in a front-end context so maybe it’s something with your customized templating.
Looking at your template changes, it might be this part:
<?php do_action( 'tribe_events_single_event_before_the_meta' ) ?> <?php echo tribe_get_template_part( 'modules/meta' ); ?> <?php do_action( 'tribe_events_single_event_after_the_meta' ) ?>If you comment those lines out or remove them entirely, does the error go away?
December 19, 2017 at 12:07 pm #1409060Courtney
MemberHey there Zoe
We’ve just released an update that should fix this bug. You can read more about it at http://m.tri.be/19tp. Please update your plugins and let us know if you are still experiencing this or if we can close out this ticket.
Note: We suggest testing updates on a staging server (https://theeventscalendar.com/knowledgebase/creating-using-wordpress-staging-site/).
Thanks
Courtney 🙂January 10, 2018 at 8:37 am #1422473Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
This reply was modified 9 years, 4 months ago by
-
AuthorPosts
- The topic ‘strtotime() expects parameter 1 to be string’ is closed to new replies.
