Home › Forums › WoodMart support forum › HTTP ERROR 500
HTTP ERROR 500
- This topic has 34 replies, 3 voices, and was last updated 6 years ago by
Artem Temos.
-
AuthorPosts
-
January 23, 2019 at 6:54 pm #103701
charigin69ParticipantHello, after updating the theme, when I try to save the product after changing it, I get an error 500, but only in a grouped product.
tried to find at what point it happens, and after adding products, (screenshot)Attachments:
You must be logged in to view attached files.January 23, 2019 at 7:29 pm #103712
Artem TemosKeymasterHi,
500 Internal Error says about some issue on the server and can be caused by different things. Anyway, to understand its nature you need to see your server error logs or enable PHP error display on the website. If you can’t do this, you need to contact your hosting provider for help in this question. Here is an article that may help you understand the error better http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-internal-server-error-in-wordpress/
Regards
January 24, 2019 at 8:25 am #103792
charigin69ParticipantHere is what they said in hosting support
Included error logging in the PHP_errors.log file, it is located in the public_html directory of your site. Judging by the log, the site does not work due to the following error:
[24-Jan-2019 04:28:47 UTC] PHP Fatal error: Uncaught Error: Call to undefined method WC_Product_Grouped::get_available_variation() in /home/c/charighl/mebel/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/variation-gallery.php:90
tell me what it is and how to deal with it?January 24, 2019 at 8:51 am #103798
charigin69Participanthere is the file:
[24-Jan-2019 04:28:47 UTC] PHP Fatal error: Uncaught Error: Call to undefined method WC_Product_Grouped::get_available_variation() in /home/c/charighl/mebel/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/variation-gallery.php:90
Stack trace:
#0 /home/c/charighl/mebel/public_html/wp-includes/class-wp-hook.php(288): woodmart_remove_unnecessary_vg_data(49773)
#1 /home/c/charighl/mebel/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /home/c/charighl/mebel/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /home/c/charighl/mebel/public_html/wp-includes/post.php(3747): do_action(‘save_post’, 49773, Object(WP_Post), true)
#4 /home/c/charighl/mebel/public_html/wp-includes/post.php(3820): wp_insert_post(Array, false)
#5 /home/c/charighl/mebel/public_html/wp-admin/includes/post.php(399): wp_update_post(Array)
#6 /home/c/charighl/mebel/public_html/wp-admin/post.php(206): edit_post()
#7 {main}
thrown in /home/c/charighl/mebel/public_html/wp-content/themes/woodmart/inc/integrations/woocommerce/modules/variation-gallery.php on line 90January 24, 2019 at 9:57 am #103811
Artem TemosKeymasterHello,
Could you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?
Thank you in advance
January 24, 2019 at 10:19 am #103814
charigin69ParticipantMy main site https://mmslon.ru was still not new, I decided to try it on a test site, now I try it on a second test site.
plugins deactivated to no avail
I go to the admin panel – goods, select any test item, put the grouped save, the error occurs after loading the product – see the screenshot, further changes after clicking the save button give an errorJanuary 24, 2019 at 10:26 am #103816
charigin69Participantpassword
January 24, 2019 at 10:35 am #103821
Artem TemosKeymasterWe can’t access with this data.
January 24, 2019 at 10:50 am #103830
charigin69Participantадмин
January 24, 2019 at 10:52 am #103831
Artem TemosKeymasterYou didn’t disable additional plugins yet
January 24, 2019 at 10:55 am #103833
charigin69Participantdisconnected
January 24, 2019 at 12:17 pm #103851
Artem TemosKeymasterIt seems to work correctly now. Please, check how it works now.
January 24, 2019 at 12:22 pm #103855
charigin69ParticipantStrange but I also have everything, cache deleted.
all 500January 24, 2019 at 12:34 pm #103862
Artem TemosKeymasterWhere exactly do you see it?
January 24, 2019 at 12:37 pm #103864
charigin69ParticipantI take any goods I make it grouped I add products to the group I save and voila 500
January 24, 2019 at 12:40 pm #103868
charigin69ParticipantNow I put on the second test site the old version of the theme, everything works.
January 24, 2019 at 1:08 pm #103877
Artem TemosKeymasterHello,
Could you please check how it works with some default WordPress theme like twentysixteen to understand is it our theme issue or not?
Regards
January 24, 2019 at 1:14 pm #103878
charigin69ParticipantYes, I spent half a day, I installed 3.0 at the beginning, then I updated it to 3.4, the error repeated after the update!!!
после & ставит amp; уберитеJanuary 24, 2019 at 1:18 pm #103881
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file
function woodmart_remove_unnecessary_vg_data( $post_id ) { if ( ! woodmart_woocommerce_installed() ) { return; } $product = wc_get_product( $post_id ); if ( ! $product || $product->get_type() != 'variable' ) { return; } $available_variations = array(); foreach ( $product->get_children() as $child_id ) { $available_variations[] = $product->get_available_variation( wc_get_product( $child_id ) ); } $available_variations = array_values( array_filter( $available_variations ) ); $variations = $product->get_type() == 'variable' ? $available_variations : ''; $variations_ids = array(); $variation_gallery_data = get_post_meta( $post_id, 'woodmart_variation_gallery_data', true ); if ( ! $variations || ! $variation_gallery_data ) { return; } foreach ( $variations as $variation ) { $variations_ids[] = $variation['variation_id']; } foreach ( $variation_gallery_data as $key => $data ) { if ( ! in_array( $key, $variations_ids ) && isset( $variation_gallery_data[ $key ] ) ) { unset( $variation_gallery_data[ $key ] ); } } update_post_meta( $post_id, 'woodmart_variation_gallery_data', $variation_gallery_data ); } add_action( 'save_post', 'woodmart_remove_unnecessary_vg_data' );
January 24, 2019 at 1:25 pm #103882
charigin69ParticipantToday will be a holiday, everything seems to work, I will look further, thank you!
January 24, 2019 at 1:31 pm #103884
Artem TemosKeymasterYou are welcome.
February 1, 2019 at 1:29 pm #105336
LeoYParticipantDid this solution actually work ?
Same problem here and tried the php function in child template. But still the same error occurs when saving a grouped product that contains single products.
February 1, 2019 at 2:52 pm #105348
Artem TemosKeymasterYes, it should work. If it doesn’t work for you, please, disable all external plugins and send us your FTP as well as admin access via the Private content field.
February 1, 2019 at 4:44 pm #105382
LeoYParticipantSee privat content.
February 1, 2019 at 7:52 pm #105416
Artem TemosKeymasterSorry, we can’t access your server with this FTP. We suggest you to wait for the next update where we will include this fix. It will be released in 1-2 weeks.
February 2, 2019 at 8:05 am #105466
LeoYParticipantPlease retry with same ftp credentials.
February 2, 2019 at 9:45 am #105477
Artem TemosKeymasterStill the same. Just wait for the next update where the problem will be fixed.
February 2, 2019 at 10:20 am #105486
LeoYParticipantWe’re on a strict deadline for bringing shop up next week.
Ftp details are working. Additional info in private content.
Please check.February 2, 2019 at 10:31 am #105488
Artem TemosKeymasterTry to add the code and send us a screenshot where you placed it.
February 4, 2019 at 7:14 am #105710 -
AuthorPosts
The topic ‘HTTP ERROR 500’ is closed to new replies.
- You must be logged in to create new topics. Login / Register