• Error is happening when a post is updated with WP Document Revisions Version 3.0.0 & Version 3.0.1. WordPress Debug is giving this information.

    Fatal error: Uncaught Error: Class 'Document_Revisions' not found in httpdocs/wp-content/plugins/wpdr-simple-downloads/includes/wpdrsd-taxonomies.php:109 Stack trace: #0 httpdocs/wp-includes/class-wp-hook.php(300): ddw_wpdrsd_update_file_categories(30338) #1 httpdocs/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #2 httpdocs/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 httpdocs/wp-includes/post.php(3510): do_action('save_post', 30338, Object(WP_Post), true) #4 httpdocs/wp-includes/post.php(3583): wp_insert_post(Array, false) #5 httpdocs/wp-admin/includes/post.php(378): wp_update_post(Array) #6 httpdocs/wp-admin/post.php(193): edit_post() #7 {main} thrown in httpdocs/wp-content/plugins/wpdr-simple-downloads/includes/wpdrsd-taxonomies.php on line 109

    I think the problem is happening because the WebDav Support was dropped in Version 3.0

    • This topic was modified 7 years, 2 months ago by holzhannes.
    • This topic was modified 7 years, 2 months ago by holzhannes.
Viewing 5 replies - 1 through 5 (of 5 total)
  • +1

    Hi !

    Add same kind of problem with Wp-document-Revisions-Code-Cookbook after updating to 3.0.1

    Try replacing :

    $wpdr = Document_Revisions::$instance;

    by :

    global $wpdb;

    Let me know ??

    bdnosp, I think you had a typo in your code

    You want to replace:
    $wpdr = Document_Revisions::$instance;

    With:
    global $wpdr;

    in the following 2 files:
    wpdrsd-functions.php – line 118
    wpdrsd-taxonomies.php – lines 109 and 132

    You also want to replace:
    if ( ! class_exists( 'Document_Revisions' ) ) {

    With:
    if ( ! class_exists( 'WP_Document_Revisions' ) ) {

    in the file:
    wpdr-simple-downloads.php – line 86

    Those changes should get rid of the error and allow you to activate the plugin with the WP Documents Revision plugin 3.0.0 and above

    • This reply was modified 6 years, 10 months ago by Q Dawg. Reason: missed semi-colon in code

    Hello,
    Yes type ??

    Thanks.

    And happy new year ??

    Previous solution I posted seemed to work but didn’t use any of the options for the WP Document Revisions Simple Downloads. So don’t do that.

    Seems the problem is that in the 3.0.0 and up versions of the WP Documents Revisions plugin the class name is changed from Document_Revisions to WP_Document_Revisions so you need to do a search and replace.

    wpdr-simple-downloads.php

    line 86 needs to be changed from:
    if ( ! class_exists( 'Document_Revisions' ) ) {
    To:
    if ( ! class_exists( 'WP_Document_Revisions' ) ) {

    line 212 needs to be changed from:
    && ( class_exists( 'Document_Revisions' ) || post_type_exists( 'document' ) )
    to:
    && ( class_exists( 'WP_Document_Revisions' ) || post_type_exists( 'document' ) )

    wpdrsd-functions.php

    line 112 needs to be changed from:
    if ( ! class_exists( 'Document_Revisions' ) ) {
    To:
    if ( ! class_exists( 'WP_Document_Revisions' ) ) {

    line 118 needs to be changed from:
    $wpdr = Document_Revisions::$instance;
    to:
    $wpdr = WP_Document_Revisions::$instance;

    wpdrsd-taxonomies.php

    lines 109 and 132 need to be changed from:
    $wpdr = Document_Revisions::$instance;
    to:
    $wpdr = WP_Document_Revisions::$instance;

    Hope this helps someone.

    • This reply was modified 6 years, 10 months ago by Q Dawg. Reason: Fixed some typos
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error 500 on update Post’ is closed to new replies.