WordPress.org

Ready to get started?Download WordPress

Forums

Google Language Translator
[resolved] Warning message since upgrade (18 posts)

  1. nikkij15
    Member
    Posted 10 months ago #

    Hi Rob

    I was using the plugin successfully on our site but now get the a warning message about an invalid argument.

    I have deactivated, delete & reinstalled the plugin but I am still getting the same warning.

    Any ideas?

    Thanks
    Nikki

    http://wordpress.org/plugins/google-language-translator/

  2. nikkij15
    Member
    Posted 10 months ago #

    Sorry,

    I just read the previous message about same issues. I played around with the align left & right buttons, saved the changes & it now seems to be fine.

    Thanks for an excellent plugin - really love it.

  3. Rob Myrick
    Member
    Plugin Author

    Posted 10 months ago #

    Thanks for your post, Nikki. You currently have version 2.6 correct?

    With the latest version, it should have filled in those options for you, and it should have not generated the warning.

    Would you mind providing that info?

    Thanks, Rob

  4. nikkij15
    Member
    Posted 10 months ago #

    Hi Rob,

    Yes, the problem occurred when I updated to 2.6.

    In settings, the button was chosen for left align, but the warning did not clear until I toggled it back & forth & then saved changes.

    The message was:

    Warning: Invalid argument supplied for foreach() in /home/my site name/public_html/wp-content/plugins/google-language-translator/google-language-translator.php on line 994

    I hope this helps.

    Thanks

  5. JamesICT
    Member
    Posted 10 months ago #

    I had a similar problem after updating to WP 3.6.1

    Invalid argument error on line 1320 or thereabouts.

    I then disabled the plugin, came and looked at the forum and tried the left align change as stated above by nikkij15.

    I then tried it again on a test page.

    No error message now, but no translator either. In fact, nothing displays at all.

    Has anyone else experienced this problem and knows a solution?

  6. John
    Member
    Posted 10 months ago #

    Same problem here since 3.6.1 upgrade: version 2.6 returns error and can't be activated. I kept previous installed version 2.2

    Can someone please provide clear instructions on how to proceed?

  7. Rob Myrick
    Member
    Plugin Author

    Posted 10 months ago #

    HI dsl225, I'm sorry that it's not working for you. Was the plugin working previously, before the WordPress upgrade? Or did you upgrade, and then install the plugin?

    I would first try to force an update to the plugin, by going to Appearance > Plugins and placing a check mark next to Google Language Translator. Then in the bulk action drop down at the top left of that page, you can choose "Update".

    This will ensure that you have the most up to date version (also I had some problems about 4 or 5 days ago by uploading an incomplete version of 2.6, which has since been corrected.)

    Then once your plugin is updated, let's try to activate and go from there.

    If you are able to activate, navigate to Settings > Google Language Translator and ensure that all options have a setting assigned to them. The plugin should work for you.

    Let me know how that goes and I will try to assist further if needed. Also, would you mind providing a link to your website?

    Thanks, Rob

  8. John
    Member
    Posted 10 months ago #

    Thanks Rob,

    Difficult to explain how things happened because I run it on 2 different sites and both have an online version and another one on local server with XAMPP.

    If I remember well, problems appeared 2 days ago with WP version 3.6. I then reverted your plugin back to version 2.2 and today only I upgraded to WP 3.6.1 and tried again.

    With the first site I just managed to make it run correctly (both locally and online), after I got a sort of warning stating that I don't have enough permissions to do whatever when trying to reach the plugin's settings, but I just ignored the message, refreshed the page and saved the settings. Now all seems to be OK.

    But there is still no way to make it run on the second site (can send the link only by PM or email please) now running on WP 3.6.1. When the plugin is active and I update, all seems to be OK but when I go to settings I get this error:

    Fatal error: Cannot redeclare page() (previously declared in ...\wp-content\plugins\google-language-translator\google-language-translator.php:31) in ...\wp-content\themes\evento\lib\php\main.php on line 244

    The line mentioned above is the very last one of the following piece of code:

    function page(){
            if( (int)get_query_var('paged') > (int)get_query_var('page') ){
                $result = (int)get_query_var('paged');
            }else{
    
                if( (int)get_query_var('page') == 0 ){
                    $result = 1;
                }else{
                    $result = (int)get_query_var('page');
                }
            }
    
            return $result;
        }

    Otherwise, when I try to deactivate first and update afterwards, I get another error message, after the update, when trying to reach the settings page:

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Cannot redeclare page() (previously declared in ...\wp-content\themes\evento\lib\php\main.php:232) in ...\wp-content\plugins\google-language-translator\google-language-translator.php on line 36

    Line 232 is the second line of the code above.

    Sorry for my long post but please let me know if I may send you more details by PM or email.

    Besides the above your plugin is really excellent and worth trying to fix it because it brings a real plus to a website!

    Thanks for your help!

  9. Rob Myrick
    Member
    Plugin Author

    Posted 10 months ago #

    Thanks for your post dsl225, we will figure this out. I will definitely need a login though, hopefully I can do this on your local server if that is the site we need to fix. Would you mind sending me any details through my website here: http://www.studio88design.com/get-in-touch/

    I'm sure we can figure out the issue here. Looking forward to it!

    Thanks, Rob

  10. John
    Member
    Posted 10 months ago #

    Great, email sent through your site.
    I appreciate your assistance!

  11. JamesICT
    Member
    Posted 10 months ago #

    Hi,

    If you get this worked out via emails, could you please post the solution here?

    Thanks for your help

  12. Rob Myrick
    Member
    Plugin Author

    Posted 10 months ago #

    Hi JamesICT, would you mind navigating to the settings page and toggling all of the option, to make sure all options having something saved? And would you mind sharing a link to your website?

    I'm still not sure what is causing this issues, so I would like to view your website separately.

    You can also just share your link on my contact page, shown on my last replay to this topic.

    I will post any updates here - I'm sorry it has not worked for you yet.

    Thanks!

  13. Rob Myrick
    Member
    Plugin Author

    Posted 10 months ago #

    Hi dsl225, it appears that your theme and my plugin have a function with the same name:

    Go to line 30 in the Google Language Translator plugin, and find this:


    function page (){
    global $p;

    add_action( 'admin_enqueue_scripts', 'scripts');

    $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', 'page_cb');
    }
    add_action('admin_menu', 'page');

    All we have to do is change this function to a different name, let's call it page_layout, like this:


    function page_layout (){
    global $p;

    add_action( 'admin_enqueue_scripts', 'scripts');

    $p = add_options_page('Google Language Translator', 'Google Language Translator', 'manage_options', 'google_language_translator', 'page_cb');
    }
    add_action('admin_menu', 'page_layout');

    Try that out and let me know if that removes the error you are receiving. Please post your results here.

    Thanks!

  14. John
    Member
    Posted 10 months ago #

    Congrats! That works just fine.
    No more issues here.

    Thanks a lot for your help and solution!

  15. Rob Myrick
    Member
    Plugin Author

    Posted 10 months ago #

    That's fantastic...I'm glad it worked out. I'm probably going to change that function name for future updates. Such a basic name for that function is bound to happen at some point again. Thanks for posting your issue.

    Rob Myrick

  16. Rob Myrick
    Member
    Plugin Author

    Posted 9 months ago #

    Hi JamesICT, did you still need help with this? I will help if needed, please just post your website link, and make sure all of your settings are filled-in on the settings page. We have been experiencing display issues there if those are not fully saved. Thanks!

  17. Rob Myrick
    Member
    Plugin Author

    Posted 9 months ago #

    I'm closing this as resolved...

  18. torsten.dreier
    Member
    Posted 9 months ago #

    Sorry, I am posting this late, however, it might help someone. I have Google Language Translator and OSE Firewall Security installed on 2 sites. This morning both sites had the white screen of death. Disabling either one or both plugins solved the issue. Then I noticed the 'invalid argument' issue on the bottom of my pages. I went into the settings for this plugin and simply saved them again. That solved the issue and now Google Language Translator and OSE Firewall live happily together again.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.