Support » Plugin: Remote Content Shortcode » PHP 7.2 compatibility

  • tcmw

    (@tcmw)


    Is the Remote Content Shortcode plugin compatible with PHP 7.2?

    I tried to use the PHP Compatibility Checker plugin from WPEngine but it’s not able to scan the plugin in the time allowed.

    Sorry, the site is not publically available, but, the behavior I see is the page with the shortcode will render up until the shortcode is encountered. Without debugging turned on it’s just a blank spot in the page, with debugging it shows:

    Fatal error: Uncaught Error: Class ‘DOMDocument’ not found in /wp-content/plugins/remote-content-shortcode/inc/phpQuery.php:255
    Stack trace:
    #0 /wp-content/plugins/remote-content-shortcode/inc/phpQuery.php(324): DOMDocumentWrapper->documentCreate(‘UTF-8’)
    #1 /wp-content/plugins/remote-content-shortcode/inc/phpQuery.php(244): DOMDocumentWrapper->loadMarkupHTML(‘<!DOCTYPE html>…’)
    #2 /wp-content/plugins/remote-content-shortcode/inc/phpQuery.php(191): DOMDocumentWrapper->loadMarkup(‘<!DOCTYPE html>…’)
    #3 /wp-content/plugins/remote-content-shortcode/inc/phpQuery.php(177): DOMDocumentWrapper->load(‘<!DOCTYPE html>…’, NULL, NULL)
    #4 /wp-content/plugins/remote-content-shortcode/inc/phpQuery.php(4857): DOMDocumentWrapper->__construct(‘<!DOCTYPE html>…’, NULL, NULL)
    #5 /wp-content/p in /wp-content/plugins/remote-content-shortcode/inc/phpQuery.php on line 255

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author doublesharp

    (@doublesharp)

    It looks like you don’t have php-xml installed. Depending on your OS you can install it via something like sudo apt-get install -y php-xml for Ubuntu/Debian or sudo yum install -y php-xml for CentOS/Redhat. Make sure to restart Apache/php-fpm/etc before testing.

    Thanks! I’ve got php-xml installed now.

    When I run the PHP Compatibility Checker I get a couple of errors:
    FILE: /wp-content/plugins/remote-content-shortcode/inc/phpQuery.php
    ———————————————————————————————————————————————————————
    FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
    ———————————————————————————————————————————————————————
    2233 | WARNING | Method name “phpQueryObject::__pseudoClassParam” is discouraged; PHP has reserved all method names with a double underscore prefix for future use.
    2469 | WARNING | Method name “phpQueryObject::__loadSuccess” is discouraged; PHP has reserved all method names with a double underscore prefix for future use.
    4209 | ERROR | Function split() is deprecated since PHP 5.3 and removed since PHP 7.0; Use preg_split() instead
    4277 | WARNING | Method name “phpQueryObject::__dumpTree” is discouraged; PHP has reserved all method names with a double underscore prefix for future use.
    5639 | ERROR | Using ‘break’ outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0
    ———————————————————————————————————————————————————————

    Do you know if the Remote Content Shortcode plugin compatible with PHP 7.2?

    Plugin Author doublesharp

    (@doublesharp)

    It looks like it may not be compatible with 7.2 based on your report. The phpQuery.php file is included from here https://github.com/punkave/phpQuery and hasn’t been updated in 7 years so it’s not surprising it’s out of date.

    If you have time to patch it or can find an updated library please let me know and I will try to get it updated. Otherwise I can try to update it when I have time, but I am fairly busy with other work right now.

    Thanks!

    It looks like phpQuery is now being kept up to date here https://github.com/slaith/phpQuery

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.