• Resolved pab49162

    (@pab49162)


    Hi,

    I recently got an automated email saying that WordPress detected that a plugin causes a fatal error on a website I support.

    In this case, WordPress caught an error with one of my plugins, Sync Post With Other Site.

    Here are some details from the automated email message:

    WordPress version 6.0.1
    Active theme: Brook (version 2.7.2)
    Current plugin: Sync Post With Other Site (version 1.4.1)
    PHP version 7.4.26
    
    Error Details
    =============
    
    An error of type E_ERROR was caused in line 126 of the file .../wp-content/plugins/sync-post-with-other-site/includes/sps_sync.class.php. Error message: Uncaught Error: Cannot use object of type WP_Error as array in .../wp-content/plugins/sync-post-with-other-site/includes/sps_sync.class.php:126
    Stack trace:
    #0 .../wp-includes/class-wp-hook.php(307): SPS_Sync->sps_save_post(7994, Object(WP_Post), true)
    #1 .../wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(37372, Array)
    #2 .../wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #3 .../wp-includes/post.php(4673): do_action('save_post', 7994, Object(WP_Post), true)
    #4 .../wp-includes/post.php(4775): wp_insert_post(Array, false, true)
    #5 .../wp-admin/includes/post.php(426): wp_update_post(Array)
    #6 .../wp-admin/post.php(227): edit_post()
    #7 {main}

    I did a quick check of this forum and couldn’t find anything related to this issue. So I am wondering if this problem may be a conflict between this plugin and the theme.

    Any suggestions or comments regarding this error would be appreciated.

    Thanks in advance, Paul

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m experiencing the same issue. Tested on blank WP installation – I’m getting this error when publishing a new post.

    Actually, I entered the host name of the target website as domain.com instead of https://domain.com
    I corrected this and the error is gone.

    Thread Starter pab49162

    (@pab49162)

    Nazar Hotsa – thank you for the replies and the suggestion to leave the protocol prefix off of the url.

    I will give this a try in the next day or two.

    • This reply was modified 2 years, 2 months ago by pab49162.
    Thread Starter pab49162

    (@pab49162)

    Quick postscript note …

    The suggestion to leave the protocol prefix off of the url did not quite work for us. While we didn’t get an error, the post on the other site did not appear.

    While looking at this, we noticed that the original target website was specified as https:// but the actual target website is secure (accessed with https://). So we then tried updating the target to https:// and that seemed to work. Possibly the plugin has difficult when a HTTPS redirect occurs?

    Hopefully, this thread will help anyone else who has similar issues.

    Can anyone help, i tried the above and it set to https://, we get below

    Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /home/customer/www/oursite/public_html/wp-content/plugins/sync-post-with-other-site/includes/sps_sync.class.php:126 Stack trace: #0 /home/customer/www/oursite/public_html/wp-includes/class-wp-hook.php(307): SPS_Sync->sps_save_post(25499, Object(WP_Post), true) #1 /home/customer/www/oursite/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #2 /home/customer/www/oursite/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #3 /home/customer/www/oursite/public_html/wp-includes/post.php(4673): do_action('save_post', 25499, Object(WP_Post), true) #4 /home/customer/www/oursite/public_html/wp-includes/post.php(4775): wp_insert_post(Array, false, true) #5 /home/customer/www/oursite/public_html/wp-admin/includes/post.php(426): wp_update_post(Array) #6 /home/customer/www/oursite/public_html/wp-admin/post.php( in /home/customer/www/oursite/public_html/wp-content/plugins/sync-post-with-other-site/includes/sps_sync.class.php on line 126

    Was the problem solved? Out of 10 publications, this error appears in one

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal PHP Error on line 126 in file sps_sync.class.php’ is closed to new replies.