Home Forums Newsletter Plugin Support Uncaught Error: Call to a member function replace()…

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #91617
    piotreba
    Participant

    Hi,

    I set up a Newsletter widget form, which is displayed in a footer. I also use WooCommerce and I wanted to customize WC My Account page to also display Newsletter subpage with options to unsubscribe, export data, and so on. I managed to add a “Newsletter” endpoint to the WC My Account page, which now only shows “test” text. The problem is that when I visit this page, the Newsletter form in the footer doesn’t show up, instead it gives the following error:

    Uncaught Error: Call to a member function replace() on string in xxx/wp-content/plugins/newsletter/widget/standard.php:174 Stack trace: #0 xxx/wp-includes/class-wp-widget.php(372): NewsletterWidget->widget(Array, Array) #1 xxx/wp-includes/widgets.php(742): WP_Widget->display_callback(Array, Array) #2 xxx/wp-content/themes/generatepress/inc/structure/footer.php(102): dynamic_sidebar(‘footer-4′) #3 xxx/wp-content/themes/generatepress/inc/structure/footer.php(183): generate_do_footer_widget(’25’, 4) #4 xxx/wp-includes/class-wp-hook.php(286): generate_construct_footer_widgets(”) #5 xxx/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array) #6 xxx/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #7 xxx/wp-content/themes/generatepress/footer.php(42): do_action(‘generate_footer’) #8 xxx in xxx/wp-content/plugins/newsletter/widget/standard.php on line 174

    Is it a plugin-related issue?

    #91656
    Stefano
    Keymaster

    Hi, that code is using a global variable which probably is replaced by another plugin. I’ll change the code to protect the widget from such kind of events (we forgot to change it, that “protection” is already in place on other functions).

    Thank you for your report, Stefano.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.