Home Forums WoodMart support forum Bunch of errors in Widgets

Bunch of errors in Widgets

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #313568

    Holger
    Participant

    As i got mails from WordPress, informing me about a technical problem on my site, i logged in to investigate and went to the widgets area (in recovery mode).

    Several messages about Woodmart widgets with errors appeared.

    The websitelink is the widget (product categories) that seams to fire the error. But that seams to be only the first of many…

    Would be great, if you could fix that.

    cheers, Holger

    Attachments:
    You must be logged in to view attached files.
    #313571

    Holger
    Participant

    Got an additional mail now:

    Besuchen Sie zunächst Ihre Website (https://goldschmiede-recke.de/) und überprüfen Sie diese auf sichtbare Probleme. Besuchen Sie als nächstes die Seite, auf der der Fehler aufgetreten ist (see private content) und prüfen Sie, ob es sichtbare Probleme gibt.

    Bitte kontaktieren Sie Ihr Hosting-Unternehmen, um Unterstützung bei der weiteren Untersuchung dieses Problems zu erhalten.

    Wenn Ihre Website fehlerhaft zu sein scheint und Sie nicht mehr wie gewohnt auf Ihr Dashboard zugreifen können, hat WordPress jetzt einen speziellen „Wiederherstellungsmodus“. Auf diese Weise können Sie sich sicher in Ihrem Dashboard anmelden und weitere Untersuchungen durchführen.

    https://goldschmiede-recke.de/wp-login.php?action=enter_recovery_mode&rm_token=2s0YvsBMLrqjUaVevfLpyR&rm_key=WGaTcG3YyUvArLdp6bKZdh

    Um Ihre Website zu schützen, läuft dieser Link in 1 Tag ab. Aber keine Sorge: Ein neuer Link wird Ihnen per E-Mail zugeschickt, wenn der Fehler nach Ablauf der Frist erneut auftritt.

    Wenn Sie Hilfe bei diesem Problem suchen, werden Sie möglicherweise nach einigen der folgenden Informationen gefragt:
    WordPress-Version 5.8
    Aktuelles Theme: Woodmart (Version 6.1.4)
    Aktuelles Plugin: (Version )
    PHP-Version 7.4.22

    Fehler-Details
    ==============
    Ein Fehler vom Typ E_ERROR wurde in der Zeile 1176 der Datei /…my-path—/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php verursacht. Fehlermeldung: Uncaught Error: Call to a member function get_cart_contents_count() on null in /…my-path—/wp-content/themes/woodmart/inc/integrations/woocommerce/template-tags.php:1176
    Stack trace:
    #0 /…my-path—/wp-content/themes/woodmart/inc/modules/sticky-toolbar.php(265): woodmart_cart_count()
    #1 /…my-path—/wp-content/themes/woodmart/inc/modules/sticky-toolbar.php(150): woodmart_sticky_toolbar_cart_template()
    #2 /…my-path—/wp-includes/class-wp-hook.php(303): woodmart_sticky_toolbar_template(”)
    #3 /…my-path—/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
    #4 /…my-path—/wp-includes/plugin.php(470): WP_Hook->do_action(Array)

    #313634

    Hello,

    We are checking and we do not see errors on the widgets.

    Please add this code to the functions.php of the child theme to fix the email issue. We will add this fix to our nearest update.

    function woodmart_cart_count() {
    		if ( ! is_object( WC() ) || ! property_exists( WC(), 'cart' ) || ! method_exists( WC()->cart, 'get_cart_contents_count' ) ) {
    			return;
    		}
    
    		$count = WC()->cart->get_cart_contents_count();
    		?>
    			<span class="wd-cart-number<?php echo woodmart_get_old_classes( ' woodmart-cart-number' ); ?>"><?php echo esc_html( $count ); ?> <span><?php echo esc_html( _n( 'item', 'items', $count, 'woodmart' ) ); ?></span></span>
    		<?php
    	}

    Best Regards

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)