1

After upgrading to Joomla 4.2.6, I am now unable to update CiviCRM current version, 5.54.2. I contacted my CiviCRM hosting company and they were not able to resolve the issue either.

The following correspondence is from the hosting company:

"We tried to upgrade your CiviCRM normally, as per: https://docs.civicrm.org/sysadmin/en/latest/upgrade/joomla/

but the "Upgrade the database" step failed with an error. This broke the entire administrative interface of Joomla as well. The following error was displayed:

0 Class "JApplication" not found

We enabled error logging in PHP, but no error is recorded in /home/site-name/private/php-errors.log. We also changed in /home/site-name/www/www/configuration.php the error reporting level to maximum.

CiviCRM tries to access this class:

plugins/authentication/civicrm/civicrm.php: $menu = JApplication::getMenu('site');

However, we could not find where it is defined. It might not be available in Joomla 4, as here:

https://api.joomla.org/cms-3/classes/JApplication.html

it says:

3.2 Use CMSApplication instead unless specified otherwise

So what we did was to restore your site to as it was."


There it is. Any help is greatfully appreciated,

Keith

Adrian-

I followed your advise and updated CiviAuthenticate from your branch (https://github.com/aydun/CiviCRM-CiviAuthenticate/blob/j4/README.md#version-5) and everything went well and was working fine until I updated CiviCRM from 5.54.2 to 5.56.2. On the CiviCRM backend I received the following message:

Sorry, there was a problem we could not recover from. The server returned a "500 - Whoops, looks like something went wrong."

I changed PHP settings from 8 to 8.1 and received this message:

An error has occurred. 0 syntax error, unexpected token "readonly", expecting identifier. The Civi front-end was showing an error as well.

Prior to the upgrade the Joomla Pre-Update Check for Joomla 4.2.6 showed the following:

CiviCRM User Management- Potential Upgrade Issue CiviCRM System Listener- Potential Upgrade Issue System Novarain Framework- Potential Upgrade Issue Authentication - CiviAuthenticate Potential Upgrade Issue System Convert Forms- Potential Upgrade Issue

I disabled these plugins until after the upgrade, except for CiviAuthenticate that was updated of course. The rest of the plugins I reactivated because I had to reactivate CiviCRM System Listener. The other plugins I'm not sure about. Also not sure what you mean by "configure CiviAuthenticate."

Any advice?

Thank you Adrian for your response. Keith


Update! The problem is not only updating CiviCRM after upgrading to Joomla 4, I can't update CiviCRM while running Joomla 3.10 either. I'm currently running CiviCRM 5.54.2 and I've tried to update to CiviCRM versions 5.56.2, 5.57.1 and 5.58.0 and they break the system. The latest attempt using 5.58.0 installed fine until I did the update database routine and was promptly presented with a blank screen. Joomla is nagging me to update to PHP 8 but I'm not sure if CiviCRM likes it. I'm back to PHP 7+.

Thanks for any help, Keith

4
  • Does it show you any more information about those 'Potential Upgrade Issues' ?
    – Aidan
    Jan 24 at 19:37
  • The more information links all read the same: "Potential Upgrade Issue This extension includes a plugin that could cause the upgrade to fail. To perform the Joomla upgrade safely you should either upgrade this extension to a version compatible with your target version of Joomla or disable the relevant plugin(s) and check again. For more information about the relevant plugins please check the 'Live Update' tab.
    – Keith
    Jan 24 at 20:41
  • The live update tab gives you links to their websites.
    – Keith
    Jan 24 at 20:43
  • Update: Got the issue is CIVICRM not work if you directly adding the menu alias on J4 it not get any routing ?view . Maybe it would be added as improvement or bug fix in next releases
    – JoomPS
    Apr 12 at 14:31

2 Answers 2

1

That looks like you have the CiviAuthenticate plugin installed.

The current version of that is not compatible with Joomla 4, but there is a new version in progress. It will hopefully end up on this branch shortly (via this PR) but until then you can try my branch

Your upgrade sequence wants to be something like:

  1. Make a note of your membership type and status settings
  2. Switch to standard Joomla authentication, disable CiviAuthenticate
  3. Upgrade to Joomla 4
  4. Upgrade CiviAuthenticate to the new version
  5. Configure CiviAuthenticate

Do that on a copy of your live site first and please leave some feedback on the PR.

2
0

Below are the steps I followed to resolve this issue. These steps worked for me, and if there's no risk for you, you can try them as well.

Important: Before starting these procedures, be sure to take a complete backup. I perform backups via SSH using the command: for i in `cat /etc/trueuserowners | awk ' { print $1 } ' | tr -d :` ; do /scripts/pkgacct $i ; done When I need to restore, I enter the /home directory and use the command: /usr/local/cpanel/bin/restorepkg --skipaccount cpmove-joomla.tar.gz for restoration.

  1. First, download the latest CiviCRM version for Joomla, extract the ZIP file, and place it in the /tmp/ directory.
  2. Backup the files /components/com_civicrm/civicrm.settings.php and /administrator/components/com_civicrm/civicrm.settings.php to your computer.
  3. Rename the com_civicrm folder in the /components/ and /administrator/components/ directories to com_civicrm2 or any other name of your choice.
  4. Access Joomla > System > Extensions > Manage Extensions and disable all extensions related to CiviCRM (do not uninstall, just disable).
  5. Start the update from Joomla > System > Extensions > Install from Folder using the path /home/joomlaa/public_html/tmp/com_civicrm. After installation, you will receive an error message; please disregard it.
  6. Restore the backup copies of /components/com_civicrm/civicrm.settings.php and /administrator/components/com_civicrm/civicrm.settings.php to their respective locations.
  7. Delete everything under the /media/civicrm/templates_c path.
  8. Download the latest version of localization files and place them under /administrator/components/com_civicrm.
  9. Access Joomla > System > Extensions > Manage Extensions and re-enable all extensions related to CiviCRM (usually just CiviCRM).
  10. Refresh the page where you received the error in Step 5 and start the database update. This time, the database update will proceed without any PHP errors, and the installation will be completed smoothly.

After these steps, I didn't experience any data loss or configuration changes.

If everything is successful, you can use SSH commands rm -rf /home/joomla/public_html/components/com_civicrm2 and rm -rf /home/joomla/public_html/administrator/components/com_civicrm2 to delete the folders you renamed for backup purposes.

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.