• Resolved wpkiller

    (@wpkiller)


    Hi There,

    Just ran a plugins upgrade on my site and got a critical error where both site and admin panel weren’t reachable. Following the below error message send to my email, I’ve renamed action-scheduler’s folder and the site is working again.

    Any idea?

    An error of type E_ERROR was caused in line 10 of the file /xxx/xxx/public_html/wp-content/plugins/action-scheduler/classes/abstracts/ActionScheduler.php. Error message: Cannot declare class ActionScheduler, because the name is already in use

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Thu P. a11n

    (@thup90)

    Hi there!

    Could you share your System Status Report, it would help us to understand your site setup a bit better. You can find it via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, paste it here in your reply.

    Hi there! I’m having the same problem.

    It seems that the class was already in use by an other plugin: wp-mail-smtp

    wp plugin list
    PHP Fatal error: Cannot declare class ActionScheduler, because the name is already in use in /www/web/app/plugins/action-scheduler/classes/abstracts/ActionScheduler.php on line 10

    With actionScheduler disabled:

    wp shell
    wp> ActionScheduler::class
    => string(15) “ActionScheduler”
    wp> (new \ReflectionClass(‘ActionScheduler’))->getFileName();
    => string(116) “/www/web/app/plugins/wp-mail-smtp/vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php”

    Shouldn’t action scheduler check if it’s already installed since it’s supposed to be used by “other plugins”?

    According to the FAQs thats what actionscheduler should do but it seems it’s not doing so?

    https://actionscheduler.org/faq/

    • This reply was modified 3 years, 5 months ago by trisky. Reason: plugin name added
    • This reply was modified 3 years, 5 months ago by trisky. Reason: formatting
    Thread Starter wpkiller

    (@wpkiller)

    @thup90 sorry but I don’t have Woocommerce installed on that site.

    This sounds like Action Scheduler library is being loaded incorrectly, so the magic of loading only once from multiple sources is being skipped. An investigation on how wp-mail-smtp loads Action Scheduler would confirm or discard that theory (unless there’s another plugin loading AS).

    Thread Starter wpkiller

    (@wpkiller)

    @crstauf thanks. I wasn’t even aware wp-mail-smtp installed this plugin.
    Actually yesterday after struggling with wp-mail-smtp for a few hours getting errors from it, I’ve removed it and replaced with another smtp plugin which actually works.
    So, can I safely remove Action Scheduler now?

    I am also facing the same error – using WP Mail SMTP and Action Scheduler on my site.

    Thread Starter wpkiller

    (@wpkiller)

    As we weren’t really getting answers here, I’ve replaced WP Mail SMTP plugin to another one which is working, and removed Action Scheduler altogether which was already disabled the last days.
    Everything seems to be working fine till now.

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Thanks for letting us know!

    Hi there!
    @wpkiller do you mind sharing which plugin did you use? I’m having the same issue.

    Thread Starter wpkiller

    (@wpkiller)

    @trisky I believe it came with WP Mail SMTP.

    This could be relevant:

    the problem happens when the test plugin includes 3.1.6 (but doesn’t occur with 3.2.0). We’ll check into this; it could be catching out other plugin combinations (including things like WooCommerce plus WooCommerce Subscriptions, depending on the respective versions).

    https://github.com/woocommerce/action-scheduler/pull/713#issuecomment-862557180

    Solved in wp-mail-smtp 2.9.0
    https://www.ads-software.com/plugins/wp-mail-smtp/#developers

    2.9.0 – 2021-06-24
    ....
    Fixed: Action Scheduler library loading issue.

    Upgrading wp-mail-smtp fixes the issue ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Critical error after plugin update’ is closed to new replies.