• Resolved floeschie

    (@floeschie)


    Hi,

    I realized that this plugin causes my WordPress page to die. This happens only if I change the plugins settings:

    1. Open plugin settings
    2. Go to “General” tab
    3. In Description settings, change Homepage description from “Website tagline” to “Custom text”
    4. Enter whatever you like as custom text

    Actual Result
    Worpress processes the page only partly, PHP seems to die when WP Total Cache magic happens. Blank Page.

    PHP Error:

    
    mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to a member function get_default_language() on null in /path/to/wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/public/class-webdados-fb-open-graph-public.php:84
    mod_fcgid: stderr: Stack trace:
    mod_fcgid: stderr: #0 /path/to/wp-includes/class-wp-hook.php(298): Webdados_FB_Public->insert_meta_tags('')
    mod_fcgid: stderr: #1 /path/to/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
    mod_fcgid: stderr: #2 /path/to/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    mod_fcgid: stderr: #3 /path/to/wp-includes/general-template.php(2574): do_action('wp_head')
    mod_fcgid: stderr: #4 /path/to/wp-content/themes/smartline-lite/header.php(10): wp_head()
    mod_fcgid: stderr: #5 /path/to/wp-includes/template.php(684): require_once('/path/to...')
    mod_fcgid: stderr: #6 /path/to/wp-includes/template.php(643): load_template('/path/to...', true)
    mod_fcgid: stderr: #7 /path/to/wp-includes/general-template.php(45): locate_template(Array, true)
    mod_fcgid: stderr: #8 /path/to/wp-co in /path/to/wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/public/class-webdados-fb-open-graph-public.php on line 84
    

    Expected Result
    Wordpress is able to generate the HTML without issues.

    Additional Info
    I think this issue is related with WP Total Cache. The plugin might not be compatible to WP Total Cache.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter floeschie

    (@floeschie)

    You can find the partly created HTML code here:

    https://gist.github.com/floeschie/6ebb446d102d0db353cec05661981b6e

    Hi there @floeschie,

    We’ve enabled W3 Total Cache and configured the plugin to have a custom text homepage description and the error didn’t show up.

    Are you using WPML?
    $sitepress->get_default_language() should only be called when using WPML.
    Maybe our is_wpml_active() function has some strange behaviour when used with W3 Total Cache.

    We’ve added some extra validation on the $sitepress variable on is_wpml_active() for now. It will be available on the next release.

    Anyway, if you have any way to send us all your W3 settings, we can test it further.

    Thread Starter floeschie

    (@floeschie)

    I’m using Polylang. However, the issue seems to be fixed in the latest version of your module.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Fatal error: Uncaught Error: Call to a member function get_default_language’ is closed to new replies.