• Hi there,

    I have several warnings in the logs, which would be great to get them fixed:

    ErrorException: Warning: Undefined property: stdClass::$rating
    #6 /wp-content/plugins/widget-google-reviews/includes/core/class-connect-google.php(180): WP_Rplg_Google_Reviews\Includes\Core\Connect_Google::save_reviews
    #5 /wp-content/plugins/widget-google-reviews/includes/core/class-connect-google.php(159): WP_Rplg_Google_Reviews\Includes\Core\Connect_Google::grw_refresh_reviews
    #4 /wp-content/plugins/widget-google-reviews/includes/class-reviews-cron.php(70): WP_Rplg_Google_Reviews\Includes\Reviews_Cron::update_schedule
    #3 /wp-includes/class-wp-hook.php(324): WP_Hook::apply_filters
    #2 /wp-includes/class-wp-hook.php(348): WP_Hook::do_action
    #1 /wp-includes/plugin.php(565): do_action_ref_array
    #0 /wp-cron.php(191): null
    ErrorException: Warning: Undefined property: stdClass::$rating
    #6 /wp-content/plugins/widget-google-reviews/includes/core/class-connect-google.php(202): WP_Rplg_Google_Reviews\Includes\Core\Connect_Google::save_reviews
    #5 /wp-content/plugins/widget-google-reviews/includes/core/class-connect-google.php(159): WP_Rplg_Google_Reviews\Includes\Core\Connect_Google::grw_refresh_reviews
    #4 /wp-content/plugins/widget-google-reviews/includes/class-reviews-cron.php(70): WP_Rplg_Google_Reviews\Includes\Reviews_Cron::update_schedule
    #3 /wp-includes/class-wp-hook.php(324): WP_Hook::apply_filters
    #2 /wp-includes/class-wp-hook.php(348): WP_Hook::do_action
    #1 /wp-includes/plugin.php(565): do_action_ref_array
    #0 /wp-cron.php(191): null
    ErrorException: Warning: Undefined property: stdClass::$reviews
    #6 /wp-content/plugins/widget-google-reviews/includes/core/class-connect-google.php(251): WP_Rplg_Google_Reviews\Includes\Core\Connect_Google::save_reviews
    #5 /wp-content/plugins/widget-google-reviews/includes/core/class-connect-google.php(159): WP_Rplg_Google_Reviews\Includes\Core\Connect_Google::grw_refresh_reviews
    #4 /wp-content/plugins/widget-google-reviews/includes/class-reviews-cron.php(70): WP_Rplg_Google_Reviews\Includes\Reviews_Cron::update_schedule
    #3 /wp-includes/class-wp-hook.php(324): WP_Hook::apply_filters
    #2 /wp-includes/class-wp-hook.php(348): WP_Hook::do_action
    #1 /wp-includes/plugin.php(565): do_action_ref_array
    #0 /wp-cron.php(191): null

    Debug information:

    URL: *snip*
    PHP Version: 8.0.30
    WP Version: 6.4.2
    WP Language: de_DE_formal
    Active Theme:
    60 1.39.3
    Outgoing HTTPS requests: Outgoing HTTPS requests are open
    Plugin Version: 3.1
    Settings:
    grw_version: 3.1
    grw_active: 1
    grw_google_api_key: *snip*
    grw_language: 
    grw_activation_time: 1691496449
    grw_auth_code: a3623cb69be1eec8443af18b0da9284e
    grw_debug_mode: 
    grw_feed_ids: 4784,4787,4790
    grw_do_activation: 
    grw_revupd_cron: 1
    grw_revupd_cron_timeout: 84015
    grw_revupd_cron_log: Executed at 1703845704507 in 189ms for feeds: 4784, 4787, 4790
    grw_debug_refresh: 
    grw_rev_notice_hide: never
    rplg_rev_notice_show: 
    grw_rate_us: 
    
    Widgets: Array
    (
        [_multiwidget] => 1
    )
    1
    
    ------------ Feeds ------------
    
    4790 Google Review Widget: {"connections":[{"lang":"de","props":{"default_photo":"https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/geocode-71.png"},"id":"ChIJBXmYWmviuEcR7B-T7ZxuFu0","photo":"https://149957.wd50.extern.regiohelden.de/wp-content/uploads/sites/9477/2023/08/favicon-solar-wald.png","name":"Schleusenweg 35","refresh":true,"local_img":true,"platform":"google"}],"options":{"view_mode":"slider","pagination":"","text_size":"","header_center":false,"header_hide_photo":false,"header_hide_name":false,"hide_based_on":true,"hide_writereview":false,"header_hide_social":false,"hide_reviews":true,"slider_speed":"","slider_text_height":"","slider_autoplay":true,"slider_hide_border":false,"slider_hide_prevnext":false,"slider_hide_dots":false,"max_width":"","max_height":"","centered":false,"dark_theme":true,"lazy_load_img":true,"google_def_rev_link":false,"open_link":true,"nofollow_link":true,"reviewer_avatar_size":"56","cache":"12","reviews_limit":""}}
    
    4787 Schleusenweg 35: {"connections":[{"lang":"de","props":{"default_photo":"https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/geocode-71.png"},"id":"ChIJBXmYWmviuEcR7B-T7ZxuFu0","photo":"https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/geocode-71.png","name":"SolarWald","refresh":true,"local_img":true,"platform":"google"}],"options":{"view_mode":"slider","pagination":"","text_size":"","header_center":false,"header_hide_photo":false,"header_hide_name":false,"hide_based_on":false,"hide_writereview":false,"header_hide_social":false,"hide_reviews":false,"slider_speed":"","slider_text_height":"","slider_autoplay":true,"slider_hide_border":false,"slider_hide_prevnext":false,"slider_hide_dots":false,"max_width":"","max_height":"","centered":false,"dark_theme":false,"lazy_load_img":true,"google_def_rev_link":false,"open_link":true,"nofollow_link":true,"reviewer_avatar_size":"56","cache":"12","reviews_limit":""}}
    
    4784 Google Review Widget: {"connections":[{"lang":"de","props":{"default_photo":"https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/geocode-71.png"},"id":"ChIJBXmYWmviuEcR7B-T7ZxuFu0","photo":"https://149957.wd50.extern.regiohelden.de/wp-content/uploads/sites/9477/2023/08/favicon-solar-wald.png","name":"Schleusenweg 35","refresh":true,"local_img":true,"platform":"google"}],"options":{"view_mode":"slider","pagination":"","text_size":"","header_center":false,"header_hide_photo":false,"header_hide_name":false,"hide_based_on":true,"hide_writereview":false,"header_hide_social":false,"hide_reviews":true,"slider_speed":"","slider_text_height":"","slider_autoplay":true,"slider_hide_border":false,"slider_hide_prevnext":false,"slider_hide_dots":false,"max_width":"","max_height":"","centered":false,"dark_theme":true,"lazy_load_img":true,"google_def_rev_link":false,"open_link":true,"nofollow_link":true,"reviewer_avatar_size":"56","cache":"12","reviews_limit":""}}
    
    
    
    ------------ Places ------------
    
    
    Array
    (
        [0] => stdClass Object
            (
                [id] => 2
                [place_id] => ChIJBXmYWmviuEcR7B-T7ZxuFu0
                [name] => Schleusenweg 35
                [photo] => 
                [icon] => https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/geocode-71.png
                [address] => Schleusenweg 35, 44628 Herne, Deutschland
                [rating] => 
                [url] => https://maps.google.com/?q=Schleusenweg+35,+44628+Herne,+Deutschland&ftid=0x47b8e26b5a987905:0xed166e9ced931fec
                [website] => 
                [review_count] => 
                [updated] => 1703845704462
            )
    
    )
    1
    
    ------------ Reviews ------------
    
    
    Array
    (
    )
    1
    ------------ Stats ------------
    
    
    Array
    (
        [0] => stdClass Object
            (
                [id] => 2
                [google_place_id] => 2
                [time] => 1691585873
                [rating] => 
                [review_count] => 0
            )
    
    )
    1

    As far as I can see, this happens if the place is rather invalid (or at least doesn’t have a proper rating). I workaround this by using the correct place ID in this case, but nevertheless it should also be checked in the plugin code if ratings/reviews actually exist.

    Best regards,
    Matthias

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Daniel K.

    (@richplugins)

    Hi,

    These warnings are appear, because you connected a Google place without a reviews, in other words, it’s not correct Google place, because it’s not linked to a business locations.

    Thanks!

    Thread Starter Matthias Kittsteiner

    (@kittmedia)

    Yes, I’m aware of that. However, this should be properly handled by the plugin. 🙂

    Plugin Author Daniel K.

    (@richplugins)

    Hi,

    Ok, we will add message about a wrong place and check for these errors in the next version.

    Thanks!

    Plugin Author Daniel K.

    (@richplugins)

    Hi,

    It should be fixed in the latest release.

    Thank you for testing!

    • This reply was modified 2 years, 5 months ago by Daniel K..
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Undefined property: stdClass::$rating/$reviews’ is closed to new replies.