Home › Forums › WoodMart support forum › WordPress error email
WordPress error email
- This topic has 4 replies, 2 voices, and was last updated 5 years, 3 months ago by KOCHER.
-
AuthorPosts
-
July 26, 2019 at 4:35 pm #134624
KOCHERParticipantHello,
I have received an email from my WordPress site. It seems there is an error due to Woodmart Theme. Please find the error message in private content section.
The website is still working but it is the second message I receive.
Can you tell me if this is a Woodmart issue or if one of my data is responsable ?Best regards,
CathyJuly 27, 2019 at 10:11 am #134667
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? Also, describe us step by step how to reproduce the error.
Thank you in advance
July 29, 2019 at 11:40 am #134928
KOCHERParticipantHello,
I can not tell you what is causing the problem because I only receive messages afterwards.
The WordPress message told the error is on line 1133 in the function.php file (/home/ecoetnousn/www/wp-content/themes/woodmart/inc/integrations/woocommerce/functions.php. Message d’erreur : Uncaught DivisionByZeroError: Modulo by zero in /home/ecoetnousn/www/wp-content/themes/woodmart/inc/integrations/woocommerce/functions.php:1133)In this file I have the below line, please see the link :
https://snag.gy/pqGdIu.jpgBest regards,
CathyJuly 29, 2019 at 12:18 pm #134937
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php
function woodmart_get_grid_el_class( $loop = 0, $columns = 4, $different_sizes = false, $xs_size = false, $sm_size = 4, $lg_size = 3, $md_size = false ) { $classes = ''; $items_wide = woodmart_get_wide_items_array( $different_sizes ); if ( ! $xs_size ) { $xs_size = apply_filters( 'woodmart_grid_xs_default', 6 ); } if ( $columns > 0 ) { $lg_size = 12 / $columns; } if ( ! $md_size ) { $md_size = $lg_size; } if ( $columns > 4 ) { $md_size = 3; } if ( $columns <= 3 ) { if ( $columns == 1 ) { $sm_size = 12; $xs_size = 12; } else { $sm_size = 6; } } // every third element make 2 times larger (for isotope grid) if ( $different_sizes && ( in_array( $loop, $items_wide ) ) ) { $lg_size *= 2; $md_size *= 2; } if ( in_array( $columns, array( 5, 7, 8, 9, 10, 11 ) ) ) { $lg_size = str_replace( '.', '_', round( 100 / $columns, 1 ) ); if ( ! strpos( $lg_size, '_' ) ) { $lg_size = $lg_size . '_0'; } } $classes .= ' col-' . $xs_size . ' col-sm-' . $sm_size . ' col-md-' . $md_size . ' col-lg-' . $lg_size; if ( $loop > 0 && $columns > 0 ) { if ( 0 == ( $loop - 1 ) % $columns || 1 == $columns ) { $classes .= ' first '; } if ( 0 == $loop % $columns ) { $classes .= ' last '; } } return $classes; }
July 29, 2019 at 1:02 pm #134946
KOCHERParticipantHi,
It’s done. I’ll come back to you in case the error appears again.
Thanks.Cathy
-
AuthorPosts
- You must be logged in to create new topics. Login / Register