• Resolved programmin

    (@programmin)


    I’m seeing a number of exceptions

    Class “WP_Statistics\Service\Admin\ExportImport\ExportRestController” not found

    recently. In wp-statistics/src/Service/Admin/ExportImport/ExportImportManager.php:24

    This seems to not recur and likely something in the update process?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, your guess is very likely right. That class file (src/Service/Admin/ExportImport/ExportRestController.php) is part of the plugin, in 14.16.16, 14.16.17 and the current 14.16.18, which was released on 23 October. During an update, WordPress removes the old plugin files and copies the new ones, so for a short moment some files are missing. Any request that runs in that moment can throw “class not found”, and it stops once the update has finished.

    So if the errors stopped after the update, there is nothing to fix. You can check by comparing the times of the errors with the time of the update.

    If they come back later, reinstall the plugin: download 14.16.18 from its plugin page, go to Plugins > Add New > Upload Plugin, upload the zip and choose “Replace current with uploaded”. Then clear OPcache or your host’s cache, so PHP does not keep an old copy of the files.

    Did the errors only appear around the time of the update?

    Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hi @programmin, thanks for the report, and thanks @softglaze for jumping in.

    A small correction to the reply above: ExportRestController is not new. It has shipped in every release since 14.15.2, and it is in the 14.16.18 package here on wordpress.org.

    The error comes from the update window. WordPress removes the old plugin folder before it copies in the new one, so a request that started a moment earlier cannot find the file. It stops by itself once the update finishes.

    If you still see it after an update has finished, please share:
    – the WP Statistics version on your Plugins page
    – the time of one error, and when the last update ran
    – whether the site uses OPcache or an object cache

    Thanks again for taking the time to report this.

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

You must be logged in to reply to this topic.