RensTillmann / super-forms

18 stars 14 forks source link

Issues with Ajax Handler on latest update #11

Closed giftgator closed 5 years ago

giftgator commented 5 years ago

`[31-May-2019 18:36:19 UTC] PHP Fatal error: Uncaught Error: Class 'WP_Term_Query' not found in /home/okanag8/public_html/wp-includes/taxonomy.php:1138 Stack trace:

0 /home/okanag8/public_html/wp-includes/taxonomy.php(2016): get_terms(Array)

1 /home/okanag8/public_html/wp-includes/taxonomy.php(3386): wp_get_object_terms(Array, Array, Array)

2 /home/okanag8/public_html/wp-includes/post.php(6411): update_object_term_cache(Array, Array)

3 /home/okanag8/public_html/wp-includes/post.php(6791): update_post_caches(Array, 'any', true, true)

4 /home/okanag8/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart-session.php(97): _prime_post_caches(Array)

5 /home/okanag8/public_html/wp-includes/class-wp-hook.php(286): WC_Cart_Session->get_cart_from_session('')

6 /home/okanag8/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)

7 /home/okanag8/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)

8 /home/okanag8/public_html/wp-content/plugins/super-forms/includes/ajax-handler.php(136): do_action('wp_l in /home/okanag8/public_html/wp-includes/taxonomy.php on line 1138

`

We are seeing this everytime the edit function is triggered of a form element.

RensTillmann commented 5 years ago

This was solved a day ago, please update to v4.6.85 from Dashboard > Updates > Check again.

giftgator commented 5 years ago

Sorry that is with your latest update. We had the issue with the prior update and had hoped that yesterday's would resolve it, but still ran into the same issue. (Sorry, your work is amazing in every way though)

giftgator commented 5 years ago

I should add that this:

[30-May-2019 21:41:09 UTC] PHP Fatal error: Uncaught Error: Class 'WP_Term_Query' not found in /home/okanag8/public_html/wp-includes/taxonomy.php:1138 Stack trace:

0 /home/okanag8/public_html/wp-includes/taxonomy.php(2016): get_terms(Array)

1 /home/okanag8/public_html/wp-includes/taxonomy.php(3386): wp_get_object_terms(Array, Array, Array)

2 /home/okanag8/public_html/wp-includes/post.php(6411): update_object_term_cache(Array, Array)

3 /home/okanag8/public_html/wp-includes/post.php(6791): update_post_caches(Array, 'any', true, true)

4 /home/okanag8/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart-session.php(97): _prime_post_caches(Array)

5 /home/okanag8/public_html/wp-includes/class-wp-hook.php(286): WC_Cart_Session->get_cart_from_session('')

6 /home/okanag8/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)

7 /home/okanag8/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)

8 /home/okanag8/public_html/wp-content/plugins/super-forms/includes/ajax-handler.php(136): do_action('wp_l in /home/okanag8/public_html/wp-includes/taxonomy.php on line 1138

Was with the prior update, that being said I wonder could caching be the culprit? We did clear the cache through cloudflare but I will run another test just to be certain.

RensTillmann commented 5 years ago

Ok, let me know if you manage to fix this issue.

giftgator commented 5 years ago

Okay so with latest version this occurs when the edit element function is triggered:

XHRPOSThttps://www.giftgator.ca/wp-content/plugins/super-forms/includes/ajax-handler.php [HTTP/2.0 500 Internal Server Error 342ms]

Request URL:https://www.giftgator.ca/wp-content/plugins/super-forms/includes/ajax-handler.php Request method:POST Remote address:104.25.57.19:443 Status code: 500 Version:HTTP/2.0

Response headers (561 B)
Raw headers cache-control
no-transform, no-cache, must-revalidate, max-age=0 cf-ray
4dfbf76b1c677a21-SEA content-type
text/html;charset=UTF-8 date
Fri, 31 May 2019 21:16:01 GMT expect-ct
max-age=604800, report-uri="ht….com/cdn-cgi/beacon/expect-ct" expires Wed, 11 Jan 1984 05:00:00 GMT pragma
no-cache server
cloudflare set-cookie
super_session=efa2c3e4713aa819…9:30 GMT; Max-Age=809; path=/ X-Firefox-Spdy
h2 Request headers (2.255 KB)
Raw headers Accept
/ Accept-Encoding gzip, deflate, br Accept-Language en-US,en;q=0.5 Connection
keep-alive Content-Length
264 Content-type
application/x-www-form-urlencoded; charset=UTF-8 Cookie
wordpress_sec_11e005b029be7aae…t=1; woodmart_wishlist_hash=3 Host
www.giftgator.ca Referer https://www.giftgator.ca/wp-ad…ge=super_create_form&id=102314 TE
Trailers User-Agent
Mozilla/5.0 (Windows NT 10.0; …) Gecko/20100101 Firefox/67.0

And the log indicates this when editing the element (which doesn't work) or trying to preview the form:

[31-May-2019 21:24:26 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_post_format_get_terms' not found or invalid function name in /home/okanag8/public_html/wp-includes/class-wp-hook.php on line 288 [31-May-2019 21:24:26 UTC] PHP Warning: array_merge(): Argument #2 is not an array in /home/okanag8/public_html/wp-includes/taxonomy.php on line 2022 [31-May-2019 21:24:26 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_post_format_wp_get_object_terms' not found or invalid function name in /home/okanag8/public_html/wp-includes/class-wp-hook.php on line 288 [31-May-2019 21:24:26 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_post_format_get_terms' not found or invalid function name in /home/okanag8/public_html/wp-includes/class-wp-hook.php on line 288 [31-May-2019 21:24:26 UTC] PHP Warning: array_merge(): Argument #2 is not an array in /home/okanag8/public_html/wp-includes/taxonomy.php on line 2022 [31-May-2019 21:24:26 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_post_format_wp_get_object_terms' not found or invalid function name in /home/okanag8/public_html/wp-includes/class-wp-hook.php on line 288 [31-May-2019 21:24:26 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/okanag8/public_html/wp-includes/class-wp-list-util.php on line 150

That is with Version 4.6.85

RensTillmann commented 5 years ago

Ok thanks for sharing, well at least this is a totally new error. I have added a fix for this also. The error is most likely due to an element in combination with a specific setting you are using, that requires this class to be loaded (containing the functions that are missing). Please update to v4.6.86, then let me know if it reports any other errors.

giftgator commented 5 years ago

If I hadn't mentioned that your work is great, I shall do so again. Thanks for the quick fix, and keep up the good work!

giftgator commented 5 years ago

You are going to hate me :)

So installed your release, the back end does seem much more responsive but same issues.

XHRPOSThttps://www.giftgator.ca/wp-content/plugins/super-forms/includes/ajax-handler.php [HTTP/2.0 500 Internal Server Error 267ms]

Request URL:https://www.giftgator.ca/wp-content/plugins/super-forms/includes/ajax-handler.php Request method:POST Remote address:104.25.56.19:443 Status code: 500 Version:HTTP/2.0

Response headers (561 B)
Raw headers cache-control
no-transform, no-cache, must-revalidate, max-age=0 cf-ray
4dfc46b32e9029ff-SEA content-type
text/html;charset=UTF-8 date
Fri, 31 May 2019 22:10:08 GMT expect-ct
max-age=604800, report-uri="ht….com/cdn-cgi/beacon/expect-ct" expires Wed, 11 Jan 1984 05:00:00 GMT pragma
no-cache server
cloudflare set-cookie
super_session=efa2c3e4713aa819…7:46 GMT; Max-Age=458; path=/ X-Firefox-Spdy
h2 Request headers (2.254 KB)
Raw headers Accept
/ Accept-Encoding gzip, deflate, br Accept-Language en-US,en;q=0.5 Connection
keep-alive Content-Length
264 Content-type
application/x-www-form-urlencoded; charset=UTF-8 Cookie
wordpress_sec_11e005b029be7aae…t=1; woodmart_wishlist_hash=3 Host
www.giftgator.ca Referer https://www.giftgator.ca/wp-ad…ge=super_create_form&id=102314 TE
Trailers User-Agent
Mozilla/5.0 (Windows NT 10.0; …) Gecko/20100101 Firefox/67.0

Same issue with editing element that request error, preview also gives a blank. Undo essentially clears the entire form.

However now there is this error in the logs, and I am not entirely certain if that relates to super forms.

[31-May-2019 22:10:08 UTC] PHP Fatal error: Uncaught Error: Call to undefined function get_post_thumbnail_id() in /home/okanag8/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-variation-data-store-cpt.php:360 Stack trace:

0 /home/okanag8/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-variation-data-store-cpt.php(75): WC_Product_Variation_Data_Store_CPT->read_product_data(Object(WC_Product_Variation))

1 /home/okanag8/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Product_Variation_Data_Store_CPT->read(Object(WC_Product_Variation))

2 /home/okanag8/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(135): WC_Data_Store->read(Object(WC_Product_Variation))

3 /home/okanag8/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-simple.php(24): WC_Product->__construct(102220)

4 /home/okanag8/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-variation.php(54): WC_Product_Simple->__constr in /home/okanag8/public_html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-variation-data-store-cpt.php on line 360

RensTillmann commented 5 years ago

Ok, well I could fix this error too, but this might lead us to how many other errors, i think it's best here to drop me an email through codecanyon support here and provide wordpress login details + FTP access. https://codecanyon.net/item/super-forms-drag-drop-form-builder/13979866/support

giftgator commented 5 years ago

;) Lets hope it isn't a rabbit hole. Will create the account credentials and details right away for you.

RensTillmann commented 5 years ago

Thanks!

giftgator commented 5 years ago

Ok sent