Support

Home Forums Event Espresso Premium Message preview errors – 4.9.0.p

Message preview errors – 4.9.0.p

Posted: June 14, 2016 at 11:27 am


cv

June 14, 2016 at 11:27 am

Hi

EE 4.9.0.p / WP 4.5.2

We are getting these errors when we try and preview the default template for registrant>registration approved. We are simply clicking on the preview button.

I have installed the plugin on a new production server and now get these messages. I have changed the IP and domain in these errors (only).

Best
Matt

[Tue Jun 14 16:20:13.876943 2016] [:error] [pid 19787] [client 1.1.1.1:62962] PHP Warning:  array_shift() expects parameter 1 to be array, null given in /var/www/mydomain.com/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/messages/data_class/EE_Messages_Preview_incoming_data.class.php on line 574, referer: https://mydomain.com/wp-admin/admin.php?page=espresso_messages&id=3&context=attendee&action=edit_message_template&_wpnonce=40d9cc5929&edit_message_template_nonce=40d9cc5929&return=update_message_template
[Tue Jun 14 16:20:13.877002 2016] [:error] [pid 19787] [client 1.1.1.1:62962] PHP Warning:  array_pop() expects parameter 1 to be array, null given in /var/www/mydomain.com/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/messages/data_class/EE_Messages_Preview_incoming_data.class.php on line 582, referer: https://mydomain.com/wp-admin/admin.php?page=espresso_messages&id=3&context=attendee&action=edit_message_template&_wpnonce=40d9cc5929&edit_message_template_nonce=40d9cc5929&return=update_message_template
[Tue Jun 14 16:20:13.877200 2016] [:error] [pid 19787] [client 1.1.1.1:62962] PHP Warning:  reset() expects parameter 1 to be array, null given in /var/www/mydomain.com/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/messages/EE_message_type.lib.php on line 862, referer: https://mydomain.com/wp-admin/admin.php?page=espresso_messages&id=3&context=attendee&action=edit_message_template&_wpnonce=40d9cc5929&edit_message_template_nonce=40d9cc5929&return=update_message_template
[Tue Jun 14 16:20:13.877623 2016] [:error] [pid 19787] [client 1.1.1.1:62962] PHP Warning:  reset() expects parameter 1 to be array, null given in /var/www/mydomain.com/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/messages/EE_message_type.lib.php on line 862, referer: https://mydomain.com/wp-admin/admin.php?page=espresso_messages&id=3&context=attendee&action=edit_message_template&_wpnonce=40d9cc5929&edit_message_template_nonce=40d9cc5929&return=update_message_template
[Tue Jun 14 16:20:13.877684 2016] [:error] [pid 19787] [client 1.1.1.1:62962] PHP Warning:  reset() expects parameter 1 to be array, null given in /var/www/mydomain.com/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/messages/EE_message_type.lib.php on line 862, referer: https://mydomain.com/wp-admin/admin.php?page=espresso_messages&id=3&context=attendee&action=edit_message_template&_wpnonce=40d9cc5929&edit_message_template_nonce=40d9cc5929&return=update_message_template
[Tue Jun 14 16:20:13.912599 2016] [:error] [pid 19787] [client 1.1.1.1:62962] PHP Warning:  Invalid argument supplied for foreach() in /var/www/mydomain.com/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Recipient_List_Shortcodes.lib.php on line 111, referer: https://mydomain.com/wp-admin/admin.php?page=espresso_messages&id=3&context=attendee&action=edit_message_template&_wpnonce=40d9cc5929&edit_message_template_nonce=40d9cc5929&return=update_message_template
[Tue Jun 14 16:20:13.923994 2016] [:error] [pid 19787] [client 1.1.1.1:62962] PHP Warning:  Invalid argument supplied for foreach() in /var/www/mydomain.com/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Recipient_List_Shortcodes.lib.php on line 111, referer: https://mydomain.com/wp-admin/admin.php?page=espresso_messages&id=3&context=attendee&action=edit_message_template&_wpnonce=40d9cc5929&edit_message_template_nonce=40d9cc5929&return=update_message_template
[Tue Jun 14 16:20:13.935196 2016] [:error] [pid 19787] [client 1.1.1.1:62962] PHP Warning:  Invalid argument supplied for foreach() in /var/www/mydomain.com/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Recipient_List_Shortcodes.lib.php on line 111, referer: https://mydomain.com/wp-admin/admin.php?page=espresso_messages&id=3&context=attendee&action=edit_message_template&_wpnonce=40d9cc5929&edit_message_template_nonce=40d9cc5929&return=update_message_template


cv

June 14, 2016 at 12:49 pm

Update – this has now moved onto a fatal error.

Fatal error: Call to a member function get_variation() on a non-object in /var/www/mcq.distance-learning-ltd.com/httpdocs/wp-content/plugins/event-espresso-core-reg/admin_pages/messages/Messages_Admin_Page.core.php on line 686


cv

June 14, 2016 at 12:58 pm

Ok, I have found why there was a fatal error (and am now back to the OP warnings). If you reintstall the plugin or possibly just deactivate/activate, the green switch for email is switched off ‘This messenger delivers messages via email using the built-in wp_mail function included with WordPress’. With this switched off – it causes fatal error if you try and and preview messages.


Tony

  • Support Staff

June 15, 2016 at 6:29 am

It sounds like your message templates are out of sync with your message settings.

When your email toggle (the screen switch you mentioned above) is ‘Off’ you should not see any Email message template within the list, like this – http://take.ms/yx5gc

If you de-activate the Registration Approved message type then re-activate it does the previous work then?

Go to Event Espresso -> Messages -> Settings.

Drag the ‘Registration Approved’ message to the ‘Inactive Message Types’ section. Wait a few seconds and drag it back to the Activate messages.

Repeat this steps once more.

Now Preview the message, what does it show?

How many message templates are active in main default the list?

Have you altered the templates at all or running any custom functions?


cv

June 16, 2016 at 6:32 am

Hi Tony

Now when I toggle the email switch on and off the message list does change. All good.

However, I did what you suggested deactivate/activate/deactive/activate – but the errors still shows. I tried with another template and its the same. I have what is default for the message list, and while I have made changes to the RA template all of them show similar errors AND the RA template shows the errors if I reset to default.

What is interesting to note is that this was the only new install of 4.9.0.p that I have done. All the others have been upgrades which have not given me this issue,

We don’t have any custom functions (if we do they are also running in other installations and they work fine).

This seems to be a ‘core’ issue with this particular install – which is odd since its ‘identical’ to another site – running on the same server.

Regards
M


Lorenzo Orlando Caum

  • Support Staff

June 18, 2016 at 10:53 am

Hello,

Could you update to the latest release and let us know if the preview error continues?

https://eventespresso.com/wiki/ee4-changelog/


Lorenzo


cv

June 23, 2016 at 3:02 pm

Hi

Sorry for the delay, I have been away. I have updated to the new version but unfortunately the same messages appear.

I deleted the old version of the plugin and used the upload zip method to perform the upgrade.

Regards
M


Josh

  • Support Staff

June 24, 2016 at 10:07 am

Hi cv,

Have any events been added to the site yet? When the preview is generated it will use some of data from your events. If there’s no event data, that will lead to an error.


cv

June 24, 2016 at 10:14 am

Hi

I was just replying to say…

We believe we have accidentally discovered the cause of the issue. A change to the php max_input_vars setting seems to have made the errors go away. We increased from the default 1000 to 2000.

If this error was occurring it was being suppressed/ignored somewhere in your code as it never appeared in any logs or onscreen messages.

I still don’t know why this works on the same server in a different installation and not this one.

M


Josh

  • Support Staff

June 24, 2016 at 10:41 am

If the site where it doesn’t work doesn’t have events set up yet, that would explain why.


cv

June 24, 2016 at 10:48 am

They both had events setup – sorry that wasn’t the issue.

M


Tony

  • Support Staff

June 24, 2016 at 11:04 am

We believe we have accidentally discovered the cause of the issue. A change to the php max_input_vars setting seems to have made the errors go away. We increased from the default 1000 to 2000.

What version of PHP are you running and on what stack?

If this error was occurring it was being suppressed/ignored somewhere in your code as it never appeared in any logs or onscreen messages.

If you open up Chrome Dev Tools (or similar) on the event editor, is there any JS errors?

We have JS running on the editor that monitors the inputs and compares them to the value returned by your site for max_input_vars. As you add tickets a notice should show up stating that you have exceeded the max_input_vars limit set on your site.


cv

June 24, 2016 at 11:29 am

PHP Version 5.5.9-1ubuntu4.17

Yes, we did see the notice in the event editor which is what made us increase the max_input_vars limit. This only appeared after we added more complexity to the event – and the errors in the message preview were showing prior to this change too.

To be clear, there was no such notice on the message preview page.

If it is the same issue then its only by chance that we found it when we increased the complexity of the event and triggered the notice.

I don’t know how we would debug this further from our end, but this thread may be useful to others if something similar occurs.

M

The support post ‘Message preview errors – 4.9.0.p’ 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