Upgrade from 5.26.2 to 5.27 RC Fails
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- kcristiano added regression label
added regression label
- Owner
@kcristiano I have done a grep for this and haven't found the calling code within Core code, makes me wonder about if you have any extensions enabled
- Author Developer
@seamuslee I did a clean install of 5.26.2 and that was fine, no extensions. The error I am getting is on upgrade.
Full message
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Undefined class constant 'POST_SELECT_QUERY' in /srv/www/joomla/administrator/components/com_civicrm/civicrm/Civi/Api4/Event/Subscriber/PostSelectQuerySubscriber.php
I'll try again and double check extensions.
It was in core in 5.26.2 but was removed in 5.27, so that might be why grep doesn't find it: https://github.com/civicrm/civicrm-core/commit/334bebddd0a7caf33be31445ca3e10b4c49f3e1b#diff-9f92818d0aaa4737e1082258d8ad1c8f
But then I can't explain why it's in your tree when testing 5.27 - it might depend on the date of the tarball you're using?
- Author Developer
I just ran my steps again:
- Clean Joomla Install 3.9.19
- Install CiviCRM 5.26.2 with STABLE Version
- Test CiviCRM, all working
- only extension is iATS
- Upgrade based on docs
- Receive success message and told to update DB
- Go to Upgrade Page
[Tue Jun 23 08:11:56.831171 2020] [proxy_fcgi:error] [pid 195802:tid 140051753195264] [client 127.0.0.1:45412] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Undefined class constant 'POST_SELECT_QUERY' in /srv/www/buildkit/jcvclean/web/administrator/components/com_civicrm/civicrm/Civi/Api4/Event/Subscriber/PostSelectQuerySubscriber.php:41
As far as the date, I am using the download.civicrm.org/latest so it's the latest.
I've also tried install from URL in Joomla and that fails. Master (5.28) fails to upgrade as well.
This seems to be an issue where the installer is not cleaning up properly.
grep -iRn 'POST_SELECT_QUERY' . ./administrator/components/com_civicrm/civicrm/Civi/Api4/Event/Subscriber/PostSelectQuerySubscriber.php:41: Events::POST_SELECT_QUERY => 'onPostQuery',
I have done a manual upgrade - manually deleting all but the two
civicrm.settings.php
files andmedia/civicrm
. That upgrade succeeds, but I suspect most use the documented method.This sounds like a problem with the Joomla Upgrade and I don't know enough Joomla to determine if it's our packaging or the Joomla Installer/Upgrader.
- Author Developer
Eileen referenced API4 Docs
What I don't understand is if a manual upgrade works (deleting all civicrm files of the prior version and then installing 5.27 RC) shouldn't the automatic installer delete all files first? The issue seems to be it's not. Is that on our install package or on Joomla?
- kcristiano mentioned in issue rc#11 (closed)
mentioned in issue rc#11 (closed)
@kcristiano if we just put back that class constant - ie these few lines
is that enough to get it to work? If so we can do that & add some comment saying it's only needed for a bit to support this issue
- Author Developer
@eileen That is a temporary fix. I am unsure why the installer is not deleting the files that reference this. But for now adding
const POST_SELECT_QUERY = 'api.select_query.post';
toCivi/Api4/Event/Events.php
allows the upgrade to run. - Author Developer
- kcristiano mentioned in commit core@1a2ce1d7
mentioned in commit core@1a2ce1d7
- kcristiano closed
closed
- DaveD mentioned in issue core#1777 (closed)
mentioned in issue core#1777 (closed)
You should keep track of what files need to be deleted for the update, and then put the delete commands into the postflight() of the install script. https://github.com/civicrm/civicrm-joomla/blob/master/script.civicrm.php#L177
This is discussed in this joomla SE post (but for a folder) https://joomla.stackexchange.com/questions/3857/delete-folder-on-extension-update
https://docs.joomla.org/J2.5:Managing_Component_Updates_(Script.php) https://joomla.stackexchange.com/questions/26370/is-there-a-way-to-remove-component-media-files-on-update
I should also maybe mention that it would make sense to get rid of the cache data this way rather than requiring people to manually go to the file system.
- DaveD mentioned in issue core#2607 (closed)
mentioned in issue core#2607 (closed)
- colemanw mentioned in commit core@ba6c07fd
mentioned in commit core@ba6c07fd