• Resolved dlouwe

    (@dlouwe)


    Permalinks: Post name
    Static Front Page? No
    Polylang Settings:
    -The language is set from content
    -Hide URL language information for default language (Checked)
    -Remove /language/ in pretty permalinks
    -Detect browser language (Checked)

    Main symptoms:
    Block of notices thrown at top of page

    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\choose-lang.php on line 65
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\choose-lang.php on line 52
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\choose-lang.php on line 53
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\frontend-filters.php on line 74
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\frontend-filters.php on line 74
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\choose-lang.php on line 163
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\choose-lang.php on line 171
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\include\links.php on line 148
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\include\links.php on line 148
    ? Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\frontend-filters.php on line 74
    prefix="og: https://ogp.me/ns#">
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\frontend-filters.php on line 74
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\frontend-filters.php on line 74
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\include\links.php on line 148
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\include\links.php on line 148
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\frontend-filters.php on line 74
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\include\plugins-compat.php on line 116
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\include\plugins-compat.php on line 116
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\include\links.php on line 148
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\include\links.php on line 148
    
    Notice: Trying to get property of non-object in \wp-content\plugins\polylang\frontend\frontend-filters.php on line 74

    Warning thrown by Events Manager plugin (if present)
    Warning: array_key_exists(): The first argument should be either a string or an integer in \wp-content\plugins\events-manager\events-manager.php on line 410

    wp_nav_menu falls back to wp_page_menu
    wp_page_menu passes $args as an array, not object, so this also caused a string of notices from my custom Nav Walker

    Now the tricky part is I honestly have no idea how this happens “in the wild.” It was happening to client intermittently over the course of a couple months, always after they updated the site (I think the “intermittent” part is due to the W3TC plugin, but the issue still occurs with all plugins disabled) I’m as yet unable to duplicate the issue using their same steps; the only way I’ve been able to encounter it is by manually changing the value of the “pll_language” cookie to an empty string.

    Unchecking “Detect browser language” does prevent the issue from happening.

    https://www.ads-software.com/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    I don’t understand how it is possible taht the language is set to an empty value. However, I will try to improve the robustness in V1.6.2 to avoid these ugly notices.

    Thread Starter dlouwe

    (@dlouwe)

    Thanks for your quick response!

    As far as I can tell 1.6.2 resolves the issue, though I also don’t really understand how it was possible in the first place.

    In any case, cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"Detect browser language" sometimes setting NULL language’ is closed to new replies.