Support

Home Forums Event Espresso Premium Error updating event (when adding a venue)

Error updating event (when adding a venue)

Posted: September 6, 2024 at 6:23 am

Viewing 13 reply threads


MikeP

September 6, 2024 at 6:23 am

Recently, anytime I add a venue to an event, an error message appears that says “error updating event.” Events with existing venues still display on the front end.

Please let me know if you have experienced this yet. We’re running PHP 8,

Thank you


Tony

  • Support Staff

September 6, 2024 at 6:51 am

Hi there,

Strange, I’ve not see that before.

Can you make edits to Datetimes/Ticket on the events?

For example can you add a letter to the datetime name and then remove it again:

https://monosnap.com/file/uAPfJ0aYyBAA7jWKCm2gyI1xX36CRZ

(Those requests are similar to the venue update request and use GrahpQL, so I’m checking to confirm the GraphQL requests are functioning)


MikeP

September 6, 2024 at 9:21 am

Thanks, Tony.
Yes, it worked. Successfully updated event. Just isn’t working with venues it seems.


Tony

  • Support Staff

September 9, 2024 at 3:37 am

Hmm, yeah thats strange.

When you get an error updating a venue, can you see any errors in the server’s PHP error logs?

Your host will usually have a section to view those in your control panel, or you can add this code to your sites wp-config.php file:

https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

That tells the site to store errors in /wp-content/debug.log


MikeP

September 12, 2024 at 7:31 am

I don’t easily have access to the logs right now but I did do some trial and error and found that when I deactivated the EE Waitlist extension, and I was then able to add the venues. Seems to be a conflict with that extension? I am using Waitlist Version 1.0.4.p and Event Espresso Version 5.0.26.p


MikeP

September 12, 2024 at 7:59 am

Please disregard. That didn’t work. I’ll try to get you the logs.


Tony

  • Support Staff

September 12, 2024 at 11:49 am

Can I take a look at the request?

There may be something shown on the request when its trying to update the Venue.

If that’s ok just send temp login details over using this form:

https://eventespresso.com/send-login-details/

I’ll take a look.

Or if you want to do this yourself, open Chrome Dev Tools on the event editor page.

Sit on the network tab and change the venue, then view the GraphQL request:
https://monosnap.com/file/Iv3WkISV6g4uNPExSX27rboIEFPEix

Then view the response, copy and paste the details here:
https://monosnap.com/file/Q6Q1KD3BZ9rLlnc7GS2mQMl2BCTsqc


MikeP

September 12, 2024 at 12:28 pm

This reply has been marked as private.


MikeP

September 12, 2024 at 12:42 pm

This reply has been marked as private.


Tony

  • Support Staff

September 12, 2024 at 2:34 pm

“message”: “Invalid page template.”,

Yeah so the error is related to your page template, by the looks of it you have a custom page template in use.

That error comes from /wp-includes/post.php and its this code:

if ( ! empty( $postarr['page_template'] ) ) {
	$post->page_template = $postarr['page_template'];
	$page_templates      = wp_get_theme()->get_page_templates( $post );

	if ( 'default' !== $postarr['page_template'] && ! isset( $page_templates[ $postarr['page_template'] ] ) ) {
		if ( $wp_error ) {
			return new WP_Error( 'invalid_page_template', __( 'Invalid page template.' ) );
		}

		update_post_meta( $post_id, '_wp_page_template', 'default' );
	} else {
		update_post_meta( $post_id, '_wp_page_template', $postarr['page_template'] );
	}
}

Is that template file set on the events valid?


MikeP

September 12, 2024 at 4:07 pm

This reply has been marked as private.


Tony

  • Support Staff

September 12, 2024 at 5:43 pm

Was the template name changed at all when the template was updated?

Do you have multiple instances of the template shown in the dropdown?

Just trying to figure out possible causes for the template to be seen as invalid on existing events but not new.


MikeP

September 24, 2024 at 10:45 am

This reply has been marked as private.


Tony

  • Support Staff

September 24, 2024 at 2:08 pm

This reply has been marked as private.
Viewing 13 reply threads

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso