Support

Home Forums Event Espresso Premium Fatal Error on Message Template test send and Preview functions

Fatal Error on Message Template test send and Preview functions

Posted: November 15, 2019 at 11:08 am


Daniel

November 15, 2019 at 11:08 am

I am seeing a Fatal PHP error in the Messages system when I try these things:
Send a Test email
Preview the template using the Preview button

I am in the Default Message Template for Registration Approved and editing the Primary Registrant – I haven’t actually started editing, I am just looking at this point. I am seeing this error:


Fatal error: Uncaught Error: Call to a member function get() on null in /public_html/wp-content/plugins/eea-pricing/EE_Pricing.class.php:134 Stack trace: #0 /public_html/wp-includes/class-wp-hook.php(288): EE_Pricing->fun_override_pricing_option_in_email('

  • Que...', '[QUESTION_LIST]', Array, Array, Object(EE_Question_List_Shortcodes)) #1 /public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters('
  • Que...', Array) #2 /public_html/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Shortcodes.lib.php(188): apply_filters('FHEE__EE_Questi...', '
  • Que...', '[QUESTION_LIST]', Array, Array, Object(EE_Question_List_Shortcodes)) #3 /public_html/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Parse_Shortcodes.helper.php(234): EE_Shortcodes->parser('[QUESTION_LIST]', Array, Array) #4 /public_html/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Parse_Shortcodes.helper.php in /public_html/wp-content/plugins/eea-pricing/EE_Pricing.class.php on line 134
    There has been a critical error on your website. Please check your site admin email inbox for instructions.

    Learn more about debugging in WordPress.

  • Any insight appreciated – especially if you need more info to help me figure out what’s happening here.

    It looks to me like the get() method is looking for something in the pricing model that is not there in the testing functions.


    Tony

    • Support Staff

    November 15, 2019 at 11:35 am

    Hi Daniel,

    EE_Pricing is a class from the 3rd party EE4 Price Modifier Add-on.

    It’s hooking into the messages system, I assume to parse the price type question so that it can output the details for that question type.

    Does it work if you test a ‘real’ registration email? (Add a test registration on your event and trigger the email for that)

    It could be that the test data set up for those messages is returning values it doesn’t expect but either way, the add-on will need to be updated to fix the above as it’s not something we have control over.


    Daniel

    November 15, 2019 at 11:43 am

    Thanks for the insight, Tony.

    I also see phantom message sends with error messages that read:
    “Message failed to generate for the following reasons:
    Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.”

    Also, there are fake email addresses that look like someone who likes Star Wars (lol): farfaraway@galaxy.sp

    Real registrations are triggering emails with the correct data – none of them are carrying the Price Modifier data though so I can’t be sure if it’s a general fault in the Price Modifier addon or if it’s the test data mismatch (as you indicated).

    I can contact the developer… in the meantime, do you have a suggestion for how to get past this issue? Should I just disable the addon for now?


    Daniel

    November 15, 2019 at 11:55 am

    I was able to comment out the offending lines and get back to work!

    I’ve also sent a support ticket to AparnasCodex.

    More later.


    Tony

    • Support Staff

    November 15, 2019 at 12:04 pm

    I also see phantom message sends with error messages that read:
    “Message failed to generate for the following reasons:
    Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.”

    You can get those if there’s a fatal thrown during generation which then wipes the data, are those from your test emails?

    Also, there are fake email addresses that look like someone who likes Star Wars (lol): farfaraway@galaxy.sp

    That’s test data from within EE, the messages system needs info to generate so star wars info was used (devs are a fan 🙂 )

    Real registrations are triggering emails with the correct data – none of them are carrying the Price Modifier data though so I can’t be sure if it’s a general fault in the Price Modifier addon or if it’s the test data mismatch (as you indicated).

    The add-on is hooking into QUESTION_LIST and overriding its default behaviour, it basically means that if you use anything different in the QUESTION LIST section, I don’t think it will parse and you’ll just get whatever the add-on outputs now which is:

    '<li><strong>'.$question.'</strong></li><li>'.$parsed_ans.'</li>';

    That’s not the expected way to parse questions and effectively removes a section of the message editor so I’m fairly sure this is from the add-on, the code isn’t checking if has objects before using methods on them, which works…. until you don’t get what you expect, be that from test data or normal.


    Tony

    • Support Staff

    November 15, 2019 at 12:05 pm

    I was able to comment out the offending lines and get back to work!

    That’ll work until you get to a pricing question in the emails, which will either fatal, or more likely return something unepected for that question.


    Daniel

    November 15, 2019 at 12:14 pm

    Ok, thanks for the context… that is very helpful.
    Aparna has contacted me and will be checking into this issue. Thanks!


    Tony

    • Support Staff

    November 15, 2019 at 1:05 pm

    You’re most welcome 🙂

    The support post ‘Fatal Error on Message Template test send and Preview functions’ 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