-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to 2.40 fails with error message #152
Comments
That's a puzzling one. It works fine for me locally (running Civi-standalone master) but I can't think of any reason it wouldn't work on Backdrop as well. That |
I just tried the upgrade on the last D7 site I have and the upgrade failed with the same message. Well, 'failed' might be inaccurate as afterwards it seems to have been upgraded. This site is running 5.78.3. On one of the Backdrop sites the same thing happened, but on the other the upgrade didn't succeed. However the problem is not peculiar to Backdrop. |
I just tried another Backdrop site, cleared caches first, ran the upgrade, same crash and now it thinks the upgrade has been done. But... it happened too quickly for the upgrade to have worked. However the extension still seems to be functioning OK. |
Ah, so it's not a problem once the upgrade is done, but the error happens in the in-between zone when the new code is in place but the upgrade hasn't happened yet. Interesting... |
Yes, that seems to be the case - it crashes very quickly and then in the list of extensions it's now at the new level. |
What if you clear caches after replacing the code but before running the upgrader? |
I manually replaced the code on another site, cleared caches, but then the upgrade wouldn't run because it thought the new version was there. I should have opened up another screen to clear caches... Now I've run out of sites to play with. |
The other piece of this is that there isn't actually any upgrade to run. There hasn't been any upgrade script needed for this extension since v2.0. So your last attempt IMO behaved correctly. After replacing the code and clearing caches, there's nothing else to do, the extension is upgraded. |
I've got a dev-loop to elicit the error.
Full trace:
A few thoughts/observations: (1) In the middle of the low-level I don't fundamentally understand why we would need to call this step as part of the extension-lifecycle. It could be deleted/moved. However, that's not enough to fix this use-case. (2) There is a long-standing structural risk in how the download-upgrade step (eg
In this case, I think we're specifically seeing a bad mix of old+new files:
(3) In the design of EFv2, we made this change to the DAO classes:
I'm not exactly sure how to say it, but (intuitively) I feel like this has increased the risk of provoking the old-file/new-file problem. (Or maybe it was just a very delicate balance to begin with - and anything non-trivial is likely to disrupt it.) Aside: The defunct file problem has only affected the built-in downloader. If you're a developer who uses In the past, we've been able to find clever work-arounds for the defunct file problem. And maybe we can find one here too. (That may need some marinating...) However, IMHO, what's really needed is to split the download/upgrade into two subprocesses -- e.g. two AJAX calls;or two
|
Filed a more general issue about the in-app upgrader: https://lab.civicrm.org/dev/core/-/issues/5700. I've got working draft of a fix, but it's a little ugly. I'll post a link on 5700 when it's tidier. When testing that, I observed a secondary problem with
The fix here is to extract the PHAR and provide an equivalent subfolder. ( |
Recap: This highlighted two issues. Solutions for each:
|
This problem also affects the recent update to Geocoder - now 1.14 - which crashes in the same way. Civi at 5.81.2, Backdrop at 1.30. As I understand it from @colemanw remarks above, the crash occurs after the code has been replaced but before any update. Therefore the problem is that I have no idea whether the new release of the extension required an update after replacing the code, so the only safe course of action is to stop updating all extensions until this problem is fixed. Since the fix mentioned above is dependent on extension authors that could be a very long time?? Is there another approach? |
Upgrading to 2.40 fails with the error message:
Error: Class "CRM_Contactlayout_DAO_Base" not found in require_once() (line 15 of /home/acivior2/sa.acivi.org.uk/files/civicrm/ext/org.civicrm.contactlayout/CRM/Contactlayout/DAO/ContactLayout.php).
I encountered this on systems at 5.78.3 and also at 5.80.3. Both systems are running Backdrop.
The text was updated successfully, but these errors were encountered: