Support

Home Forums Event Espresso Premium Error after recent upgrade

Error after recent upgrade

Posted: December 16, 2022 at 11:21 am

Viewing 15 reply threads


azlro

December 16, 2022 at 11:21 am

Recently upgraded to .41p and now getting the error below when trying to edit any event:

“TypeError thrown

Return value of EE_Venue::address2() must be of the type string, null returned”

reverting to previous .40p version fixes the issue


Tony

  • Support Staff

December 19, 2022 at 10:07 am

Hi there,

Do you have the full error that was thrown at all?

I’m not getting the above on any of my test sites and I’d like to know what code is calling the above.


azlro

December 20, 2022 at 4:30 pm

That’s the entire message shown on the screen. I have turned general logging off.. Do you expect more errors in the log files? I can re-install the plugin upgrade and turn logging on..


azlro

December 21, 2022 at 2:23 pm

ok I enabled the .41-p version again and turned on server side logging, no other error is displayed in the debug.log file. The other anomaly I noticed is this version I can’t display the actual event either from the event list (this works) when I click on register, I just get a spinning wheel.. Reverting back to .40-p fixes everything.


Tony

  • Support Staff

December 29, 2022 at 8:27 am

Hmm, strange.

I can only get the above if I manually set the address2 field for a venue to be null through the DB.

I’ve created a ticket to investigate this further, I assume all of your events have been created through Event Espresso and nothing custom?


azlro

December 29, 2022 at 10:31 am

That is correct, we only add venues via the event espresso UI


Tony

  • Support Staff

December 29, 2022 at 10:54 am

Do you have access to PHPMyAdmin or similar?

And are you comfortable enough using it to take a look through tables without making the site implode? πŸ™‚


azlro

December 29, 2022 at 11:01 am

I do, but I am off grid for the next 4 to 5 days. I am very comfortable with SQL end tables. I will look at the venue data when I get back around 1 January.


Tony

  • Support Staff

December 29, 2022 at 1:24 pm

Great! So the table I’m interested in is esp_venue_meta (it will also have your sites db prefix).

VNU_address2 is that is throwing the above error, do do valid venues (or even just one) have NULL as a value for VNU_address2?


azlro

January 2, 2023 at 12:17 pm

ok, I’m back, after running a couple of queries

SELECT * FROM 5_esp_venue_meta WHERE VNU_address2 is null

returns 274 rows

SELECT * FROM 5_esp_venue_meta WHERE VNU_address2 is not null returns 48 rows

I should probably clarify your question above – we originally imported all venues via custom SQL well over a year ago. Any venue added since only through EE UI.


Tony

  • Support Staff

January 3, 2023 at 6:38 am

I should probably clarify your question above – we originally imported all venues via custom SQL well over a year ago. Any venue added since only through EE UI.

That’s likely why you’re getting this error, EE doesn’t set those values to null and in 4.10.41.p we have started to be more restrictive of type changes (in line with PHP8). Following the types that Event Espresso itself expects those values to be etc.

I have created a ticket for this, we will likely apply additional type casting for those fields in this case.


azlro

January 3, 2023 at 8:10 am

is there anything I can do on my end to update these nulls to something more friendly?


azlro

January 3, 2023 at 8:10 am

is there anything I can do on my end to update these nulls to something more friendly?


Tony

  • Support Staff

January 3, 2023 at 8:41 am

Be sure to back up your database before moving forward if this is something you want to do, you’ll need it if any of these queries don’t work as expected!

EE uses empty strings rather than NULL

So you could do something like:

UPDATE 5_esp_venue_meta SET VNU_address2 = '' WHERE VNU_address2 IS NULL

Then try 41.p again but the problem is you may just move the issue onto the next field with a return type set if those are also using NULL, if we type case the value within the getter it should stop the above regardless.

If so you can likely just do the same again using the correct column, but it does depend on the column in question.


azlro

January 3, 2023 at 9:59 am

success, I updated all fields in venue_meta to blank string where there was a NULL character .. so the 41.p upgrade now works fine.Thanks for your help and guidance .


Tony

  • Support Staff

January 3, 2023 at 12:50 pm

Awesome, I’m glad you got it running πŸ™‚

Viewing 15 reply threads

The support post ‘Error after recent upgrade’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso