Problem with the Caldera forms Plugin interfering when I try to run the archiving

Hello,

I just installed a fresh matomo on a site… No stats so I tried to run the archiver manually in the diagostics and I get

Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2021-09-06&format=json&trigger=archivephp: \'PHP Fatal error: Uncaught Error: Failed opening required \'$ABSPATH/wp-content/plugins/caldera-forms/vendor/symfony/polyfill-mbstring/bootstrap80.php\' (include_path=\'.:/usr/share/php\') in $ABSPATH/wp-content/plugins/caldera-forms/vendor/symfony/polyfill-mbstring/bootstrap.php:15

Caldera Forms is in version 1.9.4 (the latest at writing time)
Matomo plugin is in version 4.4.1 (the latest at writing time too)

I ran into this on another site, but, has it happens the plugin Caldera there was replaceable. However on this site I need the specific features of the Caldera plugin, so I can’t just shrug it off.

Any Idea why the archiver would interfere with the Caldera Form in the first place ?

Any an idea for actually solving this too ? Because that’s puzzling (and yes deactivating the Caldera plugin solves it but I don’t want to/can’t do that)

I’m replying to myself.

I solved that:

The problem stems from the system under which the site runs

Ubuntu now defaults in installing PHP 8 on a new server and into making in the default cli

Apparently symfony, who is called there, defines its PHP_VERSION_ID constant by running somewhere the cli version (or maybe it’s because were using the API, i didn’t dig that far)

so the polyfill-mbstring/bootstrap.php file throwing the error contains this at the top:

if (\PHP_VERSION_ID >= 80000) {
    return require __DIR__.'/bootstrap80.php';
}

But, and here is the rub, the sites runs on PHP 7.4 and Caldera has been installed with php 7.4, so it apparently did not dowload the bootstrap80.php when it installed

The permanent solution is to force the default cli to be the same version as the fpm that runs the site.

So in a shell under ubuntu:

$ sudo update-alternatives --config php

and check after with

$ sudo update-alternatives --display php

Then clear logs in matomo diagnostics and run the reports…

That still does not explains why Caldera gets called when running the archiver but at least it solved the bug :slight_smile: