2

I have Flexmailer 1.1.1 installed as a "non-core" extension , but since upgrading to 5.35.1 Flexmailer 1.1.2 is included with core. (This probably came in before 5.35.)

The extensions page shows 1.1.1, implying the newer core version is not in use.

  • I thought that if I removed the non-core extension dir Civi would have a hunt around and find the core version, but when I removed that dir, CiviCRM crashed complaining that it can't find it.

  • I thought that if I disabled the extension then it might find the new one, but disabling flexmailer requires disabling mosaico, too, since it's a dependency. And disabling that would also require disabling mosaicomsgtpl too. I'm a bit worried that disabling extensions might lose some configuration values along the way, which I might not notice until it's too late?!

  • I thought that I could symlink from the old location to the new core location, but again this causes a crash:

    [Symfony\Component\Debug\Exception\FatalThrowableError] 
    Class 'Civi\FlexMailer\Services' not found              
    
  • I thought I remembered that the filepath to an extension was in the db somewhere, but I searched and only found a reference to it in civicrm_extension - that table does not seem to have filepaths in it.

2 Answers 2

7

Here's how we handled this:

From within your extensions directory:

cv dis mosaicomsgtpl mosaico flexmailer
rm -rf org.civicrm.flexmailer
cv flush
cv en flexmailer mosaico mosaicomsgtpl
cv ext:up

We've found that Mosaico didn't release it's grip on Flexmailer services properly and interfered with the process of getting it to use the core-ext version!

Since adding this to our upgrade step we haven't had any further issues.

As pointed out by Pete from Fuzion you might not have mosaicomsgtpl installed. In that case your steps would look like this:

cv dis mosaico flexmailer
rm -rf org.civicrm.flexmailer
cv flush
cv en flexmailer mosaico
cv ext:up
4
  • 1
    many folk may not have that first extension, so folk don't be surprised if you get "Ignoring unrecognized extension "mosaicomsgtpl""
    – petednz - fuzion
    Jul 7, 2021 at 22:31
  • 1
    and therefore also do not bother with cv en mosaicomsgtpl either
    – petednz - fuzion
    Jul 7, 2021 at 22:32
  • HI I'm trying to use this. It hasn't worked on my first go - both extensions are still appearing in the list of extensions even after I've refreshed the page. What does en stand for - I've googled but can't find an answer. thanks
    – Caroline B
    Sep 20, 2021 at 15:53
  • It’s a shortcut for ext:enable Sep 20, 2021 at 17:24
3

Here's how I did it: Delete the cache files

From within the site's extensions dir:

EXT_DIR=/var/www/mysite.org/sites/default/files/civicrm/ext/
CONFIG_AND_LOG_DIR=/var/www/mysite.org/sites/default/files/civicrm/ConfigAndLog
BACKUP_DIR=~/just-in-case

mkdir -p "$BACKUP_DIR"
mv org.civicrm.flexmailer $BACKUP_DIR/.
cd $CONFIG_AND_LOG_DIR
rm Cache* # Remove cached container/ExtLoader files.
cv flush # runs cleanly
cv ext:upgrade-db
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.