• Hello Robert,

    I’m having trouble with the plugin. It says “Error: Unable to locate body of wiki content.”

    I checked the forum, FAQ and the installation instructions but couldn’t find a solution.
    Here is the code I use : (with ” instead of ‘ )

    [rdp-wiki-embed url=”https://en.wikipedia.org/wiki/Anthropocene” toc_show=”1″ edit_show=”0″ infobox_show=”1″ unreferenced_show=”0″]

    My WordPress is up to date and PHP is 7+

    Thanks for your help

    Kind regards

    • This topic was modified 5 years, 10 months ago by decolla.
Viewing 15 replies - 1 through 15 (of 15 total)
  • I’m having the same problem after the last update.

    Plugin Author Robert D Payne

    (@rpayne7264)

    Might be a problem with PHP.
    Someone reported that he got the error with PHP 7.3.
    But, when he downgraded to 7.2, the error went away.

    I’m seeing this problem also. A new user for your plugin. First it failed because curl blocked the use of https:// URLs. Then, I switched to the use of https:// (similar to the above problem) and this was also my result when I tried to use the plugin.

    Could you be using https:// internally in some parts of your code for the interaction, where now it may need to be https:// depending on host environment protocol restrictions?

    Thread Starter decolla

    (@decolla)

    yes, problem solved. thanks. Downgrade from PHP 7.3 to PHP 7.2.

    Downgrade doesn’t do anything for me. I’m seeing fails the generate content that says:

    ERROR: This url does not meet the site security guidelines

    in BOLD where the embed should happen. 7.2 and 7.3 are the same. See my note above re my thoughts about the cause.

    Would like to use this solution, but if it uses HTTP rather than HTTPS it is a problem waiting to happen. Can you confirm no forced ‘HTTP:’ in your code?

    It’s also not healthy to run down-level PHP unless there really is a defined bug in PHP. And then, it should be fixed with a forward patch; not a roll back.

    Plugin Author Robert D Payne

    (@rpayne7264)

    @joevansteen There is a place in the code where I force HTTP if the source URL doesn’t have a scheme, after using the parse_url PHP function. Technically, it should never happen.

    Regarding the site security guidelines error message, you need to visit the plugin settings page, and add all domains from which the plugin may draw content to the input field, under Security.

    In debug I am getting the following warnings:

    • WARNING: wp-content/plugins/rdp-wiki-embed/bl/simple_html_dom.php:1386 – preg_match(): Compilation failed: invalid range in character class at offset 4
      require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/af-genesis/page.php’), genesis, do_action(‘genesis_loop’), WP_Hook->do_action, WP_Hook->apply_filters, genesis_do_loop, genesis_standard_loop, genesis_legacy_loop, do_action(‘genesis_post_content’), WP_Hook->do_action, WP_Hook->apply_filters, genesis_do_post_content, the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, RDP_WIKI_EMBED->shortcode, RDP_WIKI_EMBED_CONTENT->fetch, RDP_WIKI_EMBED_CONTENT->content_get, rdp_simple_html_dom->load, rdp_simple_html_dom->parse, rdp_simple_html_dom->read_tag, preg_match
    • WARNING: wp-content/plugins/rdp-wiki-embed/bl/simple_html_dom.php:691 – preg_match_all(): Compilation failed: invalid range in character class at offset 4
      require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/af-genesis/page.php’), genesis, do_action(‘genesis_loop’), WP_Hook->do_action, WP_Hook->apply_filters, genesis_do_loop, genesis_standard_loop, genesis_legacy_loop, do_action(‘genesis_post_content’), WP_Hook->do_action, WP_Hook->apply_filters, genesis_do_post_content, the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, RDP_WIKI_EMBED->shortcode, RDP_WIKI_EMBED_CONTENT->fetch, RDP_WIKI_EMBED_CONTENT->content_get, rdp_simple_html_dom->find, rdp_simple_html_dom_node->find, rdp_simple_html_dom_node->parse_selector, preg_match_all
    • WARNING: wp-content/plugins/rdp-wiki-embed/bl/simple_html_dom.php:698 – Invalid argument supplied for foreach()
      require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/af-genesis/page.php’), genesis, do_action(‘genesis_loop’), WP_Hook->do_action, WP_Hook->apply_filters, genesis_do_loop, genesis_standard_loop, genesis_legacy_loop, do_action(‘genesis_post_content’), WP_Hook->do_action, WP_Hook->apply_filters, genesis_do_post_content, the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, RDP_WIKI_EMBED->shortcode, RDP_WIKI_EMBED_CONTENT->fetch, RDP_WIKI_EMBED_CONTENT->content_get, rdp_simple_html_dom->find, rdp_simple_html_dom_node->find, rdp_simple_html_dom_node->parse_selector

    Is this my problem, or yours?

    I’m not trying to place blame. I’m trying to understand your code and use it correctly from how I read your instructions.

    I have shortcode issues of my own from old code which I am trying to clean up ??

    Hi Robert,

    Downgraded to PHP 7.2 worked for me. But Is there any possibility to get this work in PHP 7.3 ?

    Thanks,

    A PHP downgrade to 7.2 also worked for me. – many thanks for the help.

    mmkoumbit

    (@mmkoumbit)

    It seems that fixing the regex patterns fixes the issue.

    There was a similar error happening in another plugin, as described here:
    https://www.ads-software.com/support/topic/whmcs-bridge-and-php-7-3/

    Line 691:
    $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is";

    Should be:
    $pattern = "/([\w\-:\*]*)(?:\#([\w\-]+)|\.([\w\-]+))?(?:\[@?(!?[\w\-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is";

    And:

    Line 1386:
    if (!preg_match("/^[\w-:]+$/", $tag)) {

    Should be:
    if (!preg_match("/^[\w\-:]+$/", $tag)) {

    Would it be possible to see if these fixes can be applied upstream to make the code PHP 7.3-compatible?

    Thank you!

    Plugin Author Robert D Payne

    (@rpayne7264)

    Please upgrade to version 1.2.16, and let me know if that fixes things.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Unable to locate body of wiki content’ is closed to new replies.