• I attempted to update my sites from PHP 7.4 to PHP 8 and after doing so there are some errors caused by this plugin. I have done standard troubleshooting steps and confirmed that the issue definitely is with the plugin – ie. disabled all other plugins and the issue still exists. I have tested this on 6 sites and all have the same result.

    An error of type E_ERROR was caused in line 424 of the file /home2/[REDACTED]/public_html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_class_ntlist.php. Error message: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /home2/[REDACTED]/public_html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_class_ntlist.php:424

    Additionally, opening the post-editor results in a blank page with a 500 error in the console.

    Disabling the plugin, or rolling back to PHP 7.4 resolves the issue.

    • This topic was modified 2 years, 12 months ago by CGS Web Designs. Reason: Added additional information
Viewing 13 replies - 1 through 13 (of 13 total)
  • I recently noticed the same issue after upgrading to PHP 8.0.13

    I have “debug mode” on, configured and published several social sites, and I don’t see any PHP warning. I am on PHP 8 in apache.

    Try again with the last version, 4.3.25.

    Thread Starter CGS Web Designs

    (@cgscomputers)

    @artgoddess thanks for jumping in! I did see the updates available (and installed them today) so I’ll be testing tonight to see if that resolves the PHP 8 errors I was getting. Thanks again ??

    Great! Let us know ??

    Thread Starter CGS Web Designs

    (@cgscomputers)

    @artgoddess Tested with PHP 8 and there are still issues with the post editor. On my sites, the post editor won’t even open and throws one of the following errors:

    An error of type E_ERROR was caused in line 424 of the file /home/[REDACTED]/public_html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_class_ntlist.php. Error message: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /home/[REDACTED]/public_html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_class_ntlist.php:424

    OR

    An error of type E_ERROR was caused in line 30 of the file /home2/[REDACTED]/public_html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pn.php. Error message: Uncaught TypeError: Cannot access offset of type string on string in /home2/[REDACTED]/public_html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/pn.php:30

    This doesn’t happen if I deactivate the NextScripts plugin or roll PHP back to 7.4.

    Turn on debug mode, and activate also debug file:
    Debugging in WordPress

    I highly recommend that you read the instructions carefully. In case you are trying to use the plugin with Twitter or Facebook, make sure the API works.

    Before trying to post, stick to the settings and configuration area of the plugin, and publish tests until no error is returned.

    I’m not a dev, so I can’t help you more. Anyway, we may expect this plugin to be still alive and eventually you may receive help from others.

    Good luck!

    Thread Starter CGS Web Designs

    (@cgscomputers)

    @artgoddess thanks for the reply – it’s definitely the plugin. I’ve been using it for years without issue on multiple sites. Debugging mode throws no errors – only the PHP error log provides information. I’ve taken one of my sites all the way down to a default theme with no other plugins installed except for SNAP and it still throws the same error when on PHP 8. There’s definitely something incompatible in there. I’m usually really good at chasing down these issues, but this one has me stumped and the developer is notoriously unresponsive, even for paying customers. I appreciate all your advice ??

    @cgscomputers I’m sorry, really. In the meantime maybe you can switch temporarily to PHP 7.

    @nextscripts we love your plugin. Honestly.

    The WordPress community is always happy to help, test and bring awareness to issues that may go under the radar to devs.

    Please, let us know if we can expect PHP 8 compatibility at some point. Many thanks for your time and effort.

    Thread Starter CGS Web Designs

    (@cgscomputers)

    @artgoddess yup that’s what I’ve done – at least for the sites for which I’m using the plugin. The rest of my sites are all on PHP 8. Thanks again for engaging, hope you have an excellent New Year!

    Same to you! ????

    Thread Starter CGS Web Designs

    (@cgscomputers)

    The unfortunate part is that I’m a paying customer and have a ticket opened with them about this since last month and it hasn’t even been acknowledged. That’s the disappointing part :/

    I just tested again as well, unfortunately same issue when editing a post with the plugin enabled you’ll get the white screen of death and the following in your Apache/Nginx error log.

    2021/12/30 12:16:03 [error] 838213#0: *708222 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /srv/www/blog/html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_class_ntlist.php:424
    Stack trace:
    #0 /srv/www/blog/html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_class_ntlist.php(424): date()
    #1 /srv/www/blog/html/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc/nxs_class_snap.php(1019): nxs_snapClassNT->showEditNTLine()
    #2 /srv/www/blog/html/wp-admin/includes/template.php(1395): nxs_SNAP->NS_SNAP_AddPostMetaTags()
    #3 /srv/www/blog/html/wp-admin/includes/post.php(2274): do_meta_boxes()
    #4 /srv/www/blog/html/wp-admin/edit-form-blocks.php(296): the_block_editor_meta_boxes()
    #5 /srv/www/blog/html/wp-admin/post.php(187): require(‘…’)
    #6 {main}
    thrown in” while reading response header from upstream, client: 100.1.1.1, server: blog, request: “GET /wp-admin/post.php?post=6948&action=edit HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php-fpm.sock:”, host: “blog”, referrer: “https://blog/wp-admin/edit.php”

    Thread Starter CGS Web Designs

    (@cgscomputers)

    @mfmcnamara1 you have no idea how nice it is to NOT be the only one with this issue haha

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Incompatible with PHP 8.’ is closed to new replies.