• Resolved altometa

    (@altometa)


    Hi, I am getting this error on my WP Multisite website. Only the premium tab is working, the rest is broken.

    Fatal error: Uncaught Error: Call to undefined function aDBc_count_all_elements_to_clean() in /wp-content/plugins/advanced-database-cleaner/includes/class_general_cleanup.php:88 Stack trace: #0 /wp-content/plugins/advanced-database-cleaner/includes/class_general_cleanup.php(23): ADBC_Clean_DB_List->aDBc_prepare_elements_to_clean() #1 /wp-content/plugins/advanced-database-cleaner/includes/class_general_cleanup.php(452): ADBC_Clean_DB_List->__construct() #2 /wp-content/plugins/advanced-database-cleaner/includes/clean_db.php(63): include_once(‘…’) #3 /wp-content/plugins/advanced-database-cleaner/advanced-db-cleaner.php(897): include_once(‘…’) #4 /wp-includes/class-wp-hook.php(324): ADBC_Advanced_DB_Cleaner->aDBc_main_page_callback() #5 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #6 /wp-includes/plugin.php(517): WP_Hook->do_action() #7 /wp-admin/admin.php(260): do_action() #8 /wp-admin/network/admin.php(13): require_once(‘…’) #9 {main} thrown in /wp-content/plugins/advanced-database-cleaner/includes/class_general_cleanup.php on line 88

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter altometa

    (@altometa)

    Could also be related to chdir. I am using a VPS. I saw some code in the plugin that doesn’t use __DIR__ like in the case of require_once and include_once.

    • This reply was modified 4 months, 1 week ago by altometa.
    • This reply was modified 4 months, 1 week ago by altometa.
    Plugin Author Younes JFR.

    (@symptote)

    Hi @altometa,

    This fatal error means that WordPress is trying to call a function from the plugin (aDBc_count_all_elements_to_clean()) that is not being loaded, so PHP considers it “undefined”. In most cases, this happens because the plugin files were not completely uploaded or an update failed, so the file that defines this function is missing or corrupted.

    Please try this:
    – Deactivate Advanced Database Cleaner on the network.
    – Delete the plugin. (Via FTP, make sure the folder of the plugin is deleted)
    – Reinstall the latest version of the plugin

    If the issue persists, please send me an email to investigate this further: https://sigmaplugin.com/contact

    Kind regards,
    Younes

    Thread Starter altometa

    (@altometa)

    I deleted and reinstalled as you suggested. It’s still the same thing.

    I see the class existing in the code, but it seems like it’s not being included.

    My VPS wasn’t setup to use chdir(__DIR__) so I think if you use require_once(‘acdb.php’) or include(‘acdb.php’), it will not find it because it doesn’t default to current directory. You have to use require_once(__DIR__ . ‘acdb.php) or include(__DIR__ . ‘acdb.php’); instead.

    • This reply was modified 4 months ago by altometa.
    • This reply was modified 4 months ago by altometa.
    • This reply was modified 4 months ago by altometa.
    Thread Starter altometa

    (@altometa)

    [Update]

    I was able to fix it by adding __DIR__ to include_once so yeah, it’s confirmed it’s my VPS setting. It doesn’t default the directory to file’s current directory.

    Not all servers have the same setup so I guess it’s safer if you use __DIR__ on require or include. You have several non-standard include and include_once code that doesn’t use __DIR__. Please fix it on next update.

    By the way, I love your plugin and I trust it to clean stuff on my database. Thanks…

    • This reply was modified 4 months ago by altometa.
    • This reply was modified 4 months ago by altometa.
    • This reply was modified 4 months ago by altometa.
    • This reply was modified 4 months ago by altometa.
    Plugin Author Younes JFR.

    (@symptote)

    Thank you very much for the update.

    A major new version (4.0.0) will be available within the next 24 hours, and this issue should be resolved automatically.

    Kind regards,
    Younes

    Thread Starter altometa

    (@altometa)

    Hi,

    I upgraded the plugin to latest version. Everything is good now. Problems been resolved!

    Thanks

    Plugin Author Younes JFR.

    (@symptote)

    Happy to know that 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.