WordPress.org

Ready to get started?Download WordPress

Forums

Google Language Translator
[resolved] Conflicting with wp scroll posts (6 posts)

  1. bikasn
    Member
    Posted 4 months ago #

  2. bikasn
    Member
    Posted 4 months ago #

    Hi,

    When I am updating Google Language Translator Version 3.0.7 to the current version, I get a fatal error message saying the following:

    "Fatal error: Cannot redeclare register_foo_widget() (previously declared in .../wp-content/plugins/google-language-translator/widget.php:49) in .../wp-content/plugins/wp-scroll-posts/wp-scroll-posts.php on line 386"

    Please check and resolve asap as I am not able to take the benefits of the new version.

  3. Rob Myrick
    Member
    Plugin Author

    Posted 4 months ago #

    Hi bikasn, I think the developer of wp-scroll-posts is using the same "sample" widget from the wordpress Codex, for their widget. We need to change the name of either my plugin widget function or theirs.

    OK, so let's try something - locate this area of widget.php:

    function register_foo_widget() {
        register_widget( 'glt_widget' );
    }
    add_action( 'widgets_init', 'register_foo_widget' );

    Then change it to this:

    function register_glt_widget() {
        register_widget( 'glt_widget' );
    }
    add_action( 'widgets_init', 'register_glt_widget' );

    That might get rid of your error - and sorry for that inconvenience. I'm going to fix that on the next update.

    Rob

  4. bikasn
    Member
    Posted 4 months ago #

    Thanks Rob...

    It worked perfectly.

  5. bikasn
    Member
    Posted 4 months ago #

    Resolved

  6. Rob Myrick
    Member
    Plugin Author

    Posted 4 months ago #

    Awesome! I'm glad it worked - thanks for using the plugin

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.