Your software
My Mautic version is: 4.4.3
My PHP version is: 7.4 and 8.0
My Database type and version is: 5.7.39
Your problem
My problem is: Focus item builder does not work. Getting the following error message when clicking on the “builder button”
These errors are showing in the log: mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: “Argument 1 passed to MauticPlugin\MauticFocusBundle\Helper\IframeAvailabilityChecker::check() must be of the type string, null given, called in /home/xxx/xxx.entice.cloud/plugins/MauticFocusBundle/Controller/AjaxController.php on line 24” at /home/xxx/xxx.entice.cloud/plugins/MauticFocusBundle/Helper/IframeAvailabilityChecker.php line 27 {“exception”:“[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Argument 1 passed to MauticPlugin\MauticFocusBundle\Helper\IframeAvailabilityChecker::check() must be of the type string, null given, called in /home/xxx/xxx.entice.cloud/plugins/MauticFocusBundle/Controller/AjaxController.php on line 24 at /home/xxx/xxx.entice.cloud/plugins/MauticFocusBundle/Helper/IframeAvailabilityChecker.php:27)”}
Steps I have tried to fix the problem:checked forum to see if any other errors are similar. We have INTL support turned on.
I appreciate the response. Just a bit odd as we have instances using 4.3 that works just fine. Might be a conflict with a plugin as we have quite a few of those installed. Anyway - we will roll back to 4.3 for now…
Just a quick note - rebuilt my Mautic instance in 4.4.2 and it’s all working properly. Something definitely funny in 4.4.3. Could be related to custom plugins. Just need to reimport in all the contacts now
Hey @gary.harrison - not sure if you are making backups of files and DB before updating, if not here is a little script that we wrote to take care of this.
It makes a backup of mautic directory and of the DB, saves it and then runs the update.
If things fail as in your case above it is pretty simple to put back. We could probably extend the script to do this as well but don’t really have the need as of yet.
#!/bin/bash
# Date Created: 25 February 2022
# Author: Surge.Media
echo "Please input the full path of where your installation of Mautic is residing. Example /var/www/mautic"
read mautdir
echo "Creating a Backup Directory where the files will be stored"
mkdir MAUTIC-BACKUP
currentdir=`pwd`
echo "Going ahead and making a tar backup of your mautic files"
cd $mautdir
tar -czvf mautic-backup-files.tar.gz *
echo "Moving backup files to the backup directory"
mv mautic-backup-files.tar.gz $currentdir/MAUTIC-BACKUP/
cd $currentdir/MAUTIC-BACKUP/
echo "What is the database name of your database?"
read mauticdb
echo "What is the username to access your mautic database?"
read mauticusername
echo "Does your DB have a password? (yes/no)"
read answer
if [[ $answer == "yes" ]]
then
echo "What is the passord to the db"
read password
echo "Creating a backup of your DB"
mysqldump -u $mauticusername $mauticdb -p$password | gzip > mautic-db-backup.sql.gz
else
echo "Creating a backup of your DB"
mysqldump -u $mauticusername $mauticdb | gzip > mautic-db-backup.sql.gz
fi
echo "Going ahead and running the Mautic update to the latest version"
php $mautdir/bin/console mautic:update:apply
echo "Finishing the installation"
php $mautdir/bin/console mautic:update:apply --finish
echo "Clering Mautic Cache"
rm -rf $mautdir/var/cache/*
echo "Updating File Permissions"
chown www-data:www-data $mautdir
echo "Your Mautic should be updated to the latest version. Good Luck"
I’ve checked the issue. It seems there is a typo in the code.
Change in Plugins/MauticFocusBundle/Controller/AjaxController.php on line 24:
instead of $url = $request->request->get('website'); set $url = $request->get('website');