Posted: August 8, 2013 at 8:37 am
|
Hi, I imported venues directly into my DB from Excel. all completed fine, but now i see this error on the event pages. I’ve tried defining the variables at arrays on the line thats having the issue, but it didn’t work. Error message is: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/69/8813369/html/wp-content/plugins/event-espresso/templates/registration_page.php on line 139 Can you help with what might be going on? |
Did you import serialized data into the _events_venue table’s meta column? At the very least you might try to add some dummy content like this: a:6:{s:7:"contact";s:0:"";s:5:"phone";s:0:"";s:7:"twitter";s:0:"";s:5:"image";s:0:"";s:7:"website";s:0:"";s:11:"description";s:16:"My venue content";} |
|
|
Sure have. venue meta is A:6:{s:7:”Contact”;s:0:””;s:5:”Phone”;s:0:””;s:7:”Twitter”;s:0:””;s:5:”Image”;s:0:””;s:7:”Website”;s:0:””;s:11:”Description”;s:0:””;} and typical event meta is A:9:{s:22:”default_payment_status”;s:0:””;s:8:”venue_id”;i:””;s:28:”additional_attendee_reg_info”;s:1:”3″;s:28:”add_attendee_question_groups”;a:2:{i:2;s:1:”2″;i:1;s:1:”1″;}s:14:”date_submitted”;s:14:”August 5, 2013″;s:13:”event_hashtag”;s:0:””;s:12:”event_format”;s:0:””;s:18:”event_livestreamed”;s:0:””;s:19:”event_thumbnail_url”;s:59:”http://valoros.com/wp-content/uploads/2013/08/Theatre01.jpg”;s:0:””;} |
Are you importing data into wp_events_detail -or- into wp_events_venue & wp_events_venue_rel? If it’s the former, the venue manager should be disabled in Event Espresso>General Settings. If it’s the latter, the venue manager should be enabled. |
|
|
I’ve imported to 5 tables. wp_events_venue, wp_events_venue_rel, wp_events_category_detail, wp_events_category_rel, wp_events_detail Everything in the serialized data fields follows the pattern of a dummy event i created. is there no way I can import to wp_event_detail, but still use the venue manager? I have all my venues imported already.. |
The venue manager feature ignores the venue data in wp_events_detail. It pulls data from wp_events_venue and wp_events_venue_rel. |
|
|
Yep. So I haven’t imported any event detail into wp_events_detail. It’s all in wp_events_venue & venue_rel the connection between the event and venue is achieved through the wp_events_venue_rel. Do the error I’m getting seems to be down to it trying to display the address info array when viewing an event.. It says the variable called isn’t an array. The error: When I manually create an event using the UI I don’t get the error when viewing event. Here’s a link to the page: |
|
CORRECTION: Yep. So I haven’t imported any venue detail into wp_events_detail. It’s all in wp_events_venue & venue_rel the connection between the event and venue is achieved through the wp_events_venue_rel. Do the error I’m getting seems to be down to it trying to display the address info array when viewing an event.. It says the variable called isn’t an array. The error: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/69/8813369/html/wp-content/plugins/event-espresso/templates/registration_page.php on line 139 When I manually create an event using the UI I don’t get the error when viewing event. |
The post you linked to is displaying from the event_post.php template. I’m not sure why it wouldn’t work for your imported events, unless the rel data is not pointing to the event ID’s that need the venue data. What might help here is you could try adding a check to make sure the venue_meta is an array. So in registration_page.php and the event_post.php template it would be: $venue_meta = (isset($event->venue_meta) && (is_array($event->venue_meta) && $event->venue_meta != ”) && (isset($add_venue_meta) && $add_venue_meta != ”) ? array_merge(unserialize($event->venue_meta), $add_venue_meta) : ”; |
|
|
Managed to fix it. My venue meta had capitals for some of the titles, made them all lower case and it fixed it. phew. Only issue i have now is that although I have “event_thumbnail_url” specified in the wp_events_detail meta data – it doesn’t seem to pick it up automatically and set the featured image for the event. I’ll create a new support ticket for that one. |
The support post ‘Error after importing venues to DB’ 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.