Support » Plugin: WP Document Revisions » Document Revisions plugin conflict after update

  • I created a new post grid on the homepage. Then the website host updated the plugins, and when I opened the site the next day, the homepage crashed. I got this error message:

    PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WP_Document_Revisions::empty_excerpt_return(), 1 passed in /www/wp-includes/class-wp-hook.php on line 292 and exactly 2 expected in /www/wp-content/plugins/wp-document-revisions/includes/class-wp-document-revisions.php:2717\nStack trace:\n#0 /www/wp-includes/class-wp-hook.php(292): WP_Document_Revisions->empty_excerpt_return('')\n#1 /www/wp-includes/plugin.php(212): WP_Hook->apply_filters('', Array)\n#2 /www/wp-content/plugins/js_composer/include/params/vc_grid_item/attributes.php(367): apply_filters('get_the_excerpt', '')\n#3 /www/wp-includes/class-wp-hook.php(292): vc_gitem_template_attribute_post_excerpt('', '')\n#4 /www/wp-includes/plugin.php(212): WP_Hook->apply_filters('', Array)\n#5 /www/wp-content/plugins/js_composer/include/params/vc_grid_item/attributes.php(346): apply_filters('vc_gitem_templa...', '', Array)\n#6 /web_doc in /www/wp-content/plugins/wp-document-revisions/includes/class-wp-document-revisions.php on line 2717

    I was able to get the homepage back after I disable my new post grid. Obviously there is a conflict, but I don’t know where. If you are able to help me translate, I would be very grateful!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • @bkaage,
    I am sorry that you are having this problem. It is due to an incorrect call in the plugin identified as js_composer. This appears, from an internet search, to be part of a yugabyte wordpress-site configuration.

    The line involved is in the error #2 in the error stack with content

    apply_filters('get_the_excerpt', '')

    If you look up the definition of the filter get_the_excerpt, you will see that it requires two parameters – hence the error message. The second parameter needs to be the post object (of which the excerpt is wanted).

    Probably you can get relief if you can add the second parameter as get_post().
    (If I am reading the correct plugin on github, it might be get_post($post).)

    Or, remove excerpts from the output in the grid.

    Why are you getting it now?

    Because the excerpt field in the record is intended by the plugin, not for a true excerpt of the post, but to hold the revision summary information. And this is to allow other users to quickly and easily see what changes you made without needing to open the actual file. In this context, “other users” are those who can edit the file, not the “general public”.

    So, in V3.3.0, this filter was created to hide the contents for everyone else.

    Presumably you did not previously have a filter on this hook. and WPDR is simply the first. Any other one would also have failed.

    Hope this is of use,
    Neil James

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