Posted: 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 |
|
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. |
|
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.. |
|
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. |
|
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? |
|
That is correct, we only add venues via the event espresso UI |
|
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? π |
|
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. |
|
Great! So the table I’m interested in is
|
|
ok, I’m back, after running a couple of queries SELECT * FROM returns 274 rows SELECT * FROM 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 I have created a ticket for this, we will likely apply additional type casting for those fields in this case. |
|
is there anything I can do on my end to update these nulls to something more friendly? |
|
is there anything I can do on my end to update these nulls to something more friendly? |
|
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 So you could do something like:
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. |
|
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 . |
|
Awesome, I’m glad you got it running π |
|
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.