Your software
My Mautic version is: 3.1.2
My PHP version is: 7.3
My Database type and version is: MariaDb 10.4
Your problem
My problem is:
Mautic started to throw an error on one of my machines after I installed a plugin i built.
Even when going back, the same thing happens.
When I try to trigger the cronjob manually it says:
Attempted to load class “DOMDocument” from the global namespace. Did you forget a “use” statement?
These errors are showing in the log:
[2020-11-27 21:34:59] mautic.NOTICE: Symfony\Component\Debug\Exception\FatalThrowableError: Class ‘DOMDocument’ not found (uncaught exception) at /var/…/mautic/app/bundles/PageBundle/Model/TrackableModel.php line 364 while running console command
mautic:campaigns:trigger
[2020-11-27 21:34:59] mautic.WARNING: Commandmautic:campaigns:trigger
exited with status code 1
Steps I have tried to fix the problem:
Updating the database schema,
Reinstalling Mautic and inserting the database,
clearing cache and read/write permissions,
…
I think it is very strange. Especially because I have the 100% same setup on more then 20 different machines running perfectly.
It would be great if someone could give me a hint where to look at. TrackableModel.php line 364 I couldn’t find something suspicious… that’s only about finding links in html documents and parse trackables. Anyway I guess somewhere there is the actual problem.