Support

Home Forums Event Espresso Premium Promotion Addon Error on Save

Promotion Addon Error on Save

Posted: September 11, 2019 at 5:08 am


Celf Creative

September 11, 2019 at 5:08 am

When saving a promotion or editing, we cannot select the type.

Error report below:


#0 /wp-content/plugins/eea-promotions/admin/promotions/templates/promotion_details_form.template.php(56): EE_Promotion->amount()
#1 /wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Template.helper.php(389): include('/home/forge/www...')
#2 /wp-content/plugins/eea-promotions/admin/promotions/Promotions_Admin_Page.core.php(472): EEH_Template::display_template" while reading upstream, client: 193.117.195.50, server: SITE_DOMAIN, request: "GET /wp-admin/admin.php?page=espresso_promotions&PRO_ID=6&action=edit&_wpnonce=61b2bba8f8&edit_nonce=61b2bba8f8&return=insert_promotion HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "SITE_DOMAIN", referrer: "https://SITE_DOMAIN/wp-admin/admin.php?page=espresso_promotions&action=create_new&create_new_nonce=c55c900f28"
2019/09/11 10:49:25 [error] 9210#9210: *480255 FastCGI sent in stderr: "('/home/forge/www...', Array)
#3 /wp-admin/includes/template.php(1306): Promotions_Admin_Page->promotion_details_metabox(NULL, Array)
#4 /wp-content/plugins/event-espresso-core-reg/core/admin/templates/admin_details_wrapper.template.php(31): do" while reading upstream, client: 193.117.195.50, server: SITE_DOMAIN, request: "GET /wp-admin/admin.php?page=espresso_promotions&PRO_ID=6&action=edit&_wpnonce=61b2bb
  • This topic was modified 4 years, 7 months ago by  Tony. Reason: Removed path


Celf Creative

September 11, 2019 at 5:10 am

Accidentally submitted without adding more info.
We have:

Updated WordPress
Deactivated plugins
Tested on local and production


Tony

  • Support Staff

September 11, 2019 at 5:16 am

Hi there,

It looks like the error is missing from the above stack trace, so we know what is being called but not what error is being thrown, can you check the logs for the line above that, it will likely have ‘FATAL ERROR:’ at the beginning.


Celf Creative

September 11, 2019 at 5:21 am

Hi Tony, many apologies, looks like we missed that out.

Fatal error: Uncaught Error: Call to a member function get() on null in /home/forge/SITE_DOMAIN/public/wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Price.class.php:275

Fatal error: Uncaught Error: Call to a member function get() on null in /home/forge/SITE_DOMAIN/public/wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Price.class.php:275 Stack trace: #0 /home/forge/SITE_DOMAIN/public/wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Price.class.php(288): EE_Price->is_percent() #1 /home/forge/SITE_DOMAIN/public/wp-content/plugins/eea-promotions/core/db_classes/EE_Promotion.class.php(151): EE_Price->pretty_price() #2 /home/forge/SITE_DOMAIN/public/wp-content/plugins/eea-promotions/admin/promotions/Promotions_Admin_List_Table.class.php(162): EE_Promotion->pretty_amount() #3 /home/forge/SITE_DOMAIN/public/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_List_Table.core.php(731): Promotions_Admin_List_Table->column_amount(Object(EE_Promotion)) #4 /home/forge/SITE_DOMAIN/public/wp-content/plugins/event-espresso-core-reg/core/admin/EE_Admin_List_Table.core.php(622): EE_Admin_List_Table->single_row_columns(Object(EE_Prom in /home/forge/SITE_DOMAIN/public/wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Price.class.php on line 275


Tony

  • Support Staff

September 11, 2019 at 5:24 am

No problem 🙂

So, can you go to Event Espresso -> Pricing.

In default pricing, what do you see?

Then in ‘Price Types’ what do you see?

Mainly I’m interested if either tab has all prices/types set to trash.


Celf Creative

September 11, 2019 at 5:30 am

Hi TOny,

It appears there are some items in the trash.
Do we need to make a “Discount” Price type?

Currently there is only a “Tax” type in there.

Many thanks


Tony

  • Support Staff

September 11, 2019 at 5:37 am

A promotion will either be:

Percent Discount
Dollar Discount

So you’ll need those 2 price types restoring, personally I would restore them all so you have:

Percent Discount
Dollar Discount
Percent Surcharge
Dollar Surcharge
Regional Tax
Tax

Having additional price types will not cause you problems, having them in trsh when sections of EE need them will do.

So in the same section above, on Price Types go to the trash filter.

Use the bulk selection checkbox to select all and then in the dropdown select ‘Restore from trash’, then click Apply.

Does that fix your promotions?


Celf Creative

September 11, 2019 at 6:11 am

Tony, that sorted it. Thanks for the help! Excellent work.

The support post ‘Promotion Addon Error on Save’ 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