awesomemotive / edd-themedd

WordPress theme for Easy Digital Downloads
https://themedd.com
33 stars 10 forks source link

Fatal error preventing checkout to render! #221

Open d9media opened 5 years ago

d9media commented 5 years ago

There is a serious issue right now on our checkout page. It stops right where cross-sell items should display.

<div itemscope itemtype="http://schema.org/Product" class="<br />
<b>Fatal error</b>:  Uncaught ArgumentCountError: Too few arguments to function themedd_edd_download_class(), 3 passed in /var/www/vhosts/ourstore.com/httpdocs/wp-includes/class-wp-hook.php on line 286 and exactly 4 expected in /var/www/vhosts/ourstore.com/httpdocs/wp-content/themes/themedd/includes/compatibility/edd/filters.php:193
Stack trace:
#0 /var/www/vhosts/ourstore.com/httpdocs/wp-includes/class-wp-hook.php(286): themedd_edd_download_class('edd_download', '', '')
#1 /var/www/vhosts/ourstore.com/httpdocs/wp-includes/plugin.php(203): WP_Hook-&gt;apply_filters('edd_download', Array)
#2 /var/www/vhosts/ourstore.com/httpdocs/wp-content/plugins/edd-cross-sell-upsell/includes/template-functions.php(166): apply_filters('edd_download_cl...', 'edd_download', '', '')
#3 /var/www/vhosts/ourstore.com/httpdocs/wp-content/plugins/edd-cross-sell-upsell/includes/template-functions.php(253): edd_csau_html()
#4 /var/www/vhosts/ourstore.com/httpdocs/wp-includes/class-wp-hook.php(286): edd_csau_display_on_checkout_page('')
#5 /var/www/vhosts/aud in <b>/var/www/vhosts/ourstore.com/httpdocs/wp-content/themes/themedd/includes/compatibility/edd/filters.php</b> on line <b>193</b><br />
SeanTOSCD commented 5 years ago

@d9media I'm not seeing this happen on my test site.

Make sure both Themedd and Cross-sell and Upsell are updated to the latest version. If you're running any custom code related to EDD core or any extensions, temporarily disable. See if the error replicates with nothing but updated Themedd, EDD, and Cross-sell and Upsell running.

Please don't leave anything else activated. If you do, it makes the troubleshooting useless.

Let me know.

d9media commented 5 years ago

Thank you @SDavisMedia for your support.

Actually as far I see we are running the latest versions. The fatal error disappeared when I disabled Cross-Sells. I'll investigate in our code whether there could be any customization that causes an error but even so, it's a bit odd that stacktrace does not indicate it.

d9media commented 5 years ago

For further testing, I'll have to mirror the site first and then report back with the method you were suggesting.

SeanTOSCD commented 5 years ago

Okay great. I'll revisit again shortly to see if I can find a way to replicate the issue.