• Resolved segmant

    (@segmant)


    Hi Shea

    I need help figuring out a error which causes our Woocommerce shop page to go down.
    I’ve been debugging with Woocommerce, thought id let you know what we’ve come up with.

    the error is

    2018-11-18T18:17:03+00:00 CRITICAL syntax error, unexpected 'textcolor_map' (T_STRING) in /var/www/vhosts/indycoffee.guide/httpdocs/wp-content/plugins/code-snippets/php/admin-menus/class-edit-menu.php(191) : eval()'d code on line 5

    except the only thing on line 5 is
    */

    We then took a closer look at it and found an extra > in this closing php tag line 408 of the /php/admin-menus/class-edit-menu.php file
    <?php checked( in_array( $snippet->id, $shared_snippets ) ); ?>>

    which the Woocommerce guys think might be the cause

    What do you think?

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Hi Segmant,

    This message is not due to an error in the plugin itself. The extra > you mention in class-edit-menu.php is completely intentional – if you look at in-context, you will see that it is part of an HTML <input> tag.

    The error actually originates in the code of one of your snippets. I can’t tell you the name or ID of the snippet causing the error, but I can tell you that the text textcolor_map appears somewhere on line 5 of the snippet.

    If you’re able to identify which snippet that is and post the code here, I can help you fix the error.

    Thread Starter segmant

    (@segmant)

    Hi Shea, yeah i just realised the > was there for a reason!

    But the textcolor_map appears in none of my snippets

    The only snippet that threw an error is this Parse error: syntax error, unexpected 'endif' (T_ENDIF), expecting end of file in your code on line 5

    add_action( 'wp_footer', 'cart_update_qty_script' );
    function cart_update_qty_script() {
      if (is_cart()) :
       ?>
        <script>
        	jQuery(window).on('load', function(){
        		jQuery("[name='update_cart']").removeAttr('disabled');
        	});
        	jQuery( document.body ).on( 'updated_cart_totals', function(){
    		    jQuery("[name='update_cart']").removeAttr('disabled');
    		});
    		jQuery('div.woocommerce').on('change', '.qty', function(){
               jQuery("[name='update_cart']").trigger("click"); 
            });
       </script>
    <?php
    endif;
    }
    Thread Starter segmant

    (@segmant)

    Hi Shea

    I export all my snippets as a PHP file and there is no text with textcolor_map

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi @segmant,

    Just wondering whether you ended up finding a solution for this?

    Thread Starter segmant

    (@segmant)

    Hi Shea

    No not resolved, still an issue

    Plugin Author Shea Bunge

    (@bungeshea)

    Are you able to post the full error message that you are still receiving here?

    Thread Starter segmant

    (@segmant)

    Hi Shea

    this is the error

    2018-11-18T18:17:03+00:00 CRITICAL syntax error, unexpected 'textcolor_map' (T_STRING) in /var/www/vhosts/indycoffee.guide/httpdocs/wp-content/plugins/code-snippets/php/admin-menus/class-edit-menu.php(191) : eval()'d code on line 5

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi Segmant,

    Can you confirm that you don’t have any active snippets that might be causing the error? I recommend double-checking that there aren’t multiple pages of snippets that aren’t in view.

    Thread Starter segmant

    (@segmant)

    Hi Shea

    No we don’t regularly add snippets. The last were added to solve a display issue with Max Mega Menu

    Snippet list

    Plugin Author Shea Bunge

    (@bungeshea)

    Has the error been occurring since that error log entry last year?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Woocommerce shop page error’ is closed to new replies.