Skip to content
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

Cache flushing issue on upgrade #101

Open
eileenmcnaughton opened this issue Jun 16, 2021 · 8 comments
Open

Cache flushing issue on upgrade #101

eileenmcnaughton opened this issue Jun 16, 2021 · 8 comments

Comments

@eileenmcnaughton
Copy link
Contributor

After upgrading the code & running the db upgrade I still get the error below

This is fixed by hitting civicrm/menu/rebuild - but really I think we should handle the menu-rebuild on upgrade in the extension or on core

image

@colemanw
Copy link
Member

I'm surprised that we don't.

@agileware-justin
Copy link

This sounds similar to this issue we have been seeing after a CiviCRM 5.42.1 upgrade. This is after a cache clear and menu rebuild. Typically appears when viewing a Contact. The following error is displayed:
BAO for ContactLayout is not available. This could be a load-order issue

Screenshot_20211026_084548

Agileware ref: CIVICRM-1862

@agileware-justin
Copy link

agileware-justin commented Nov 1, 2021

This is fixed by hitting civicrm/menu/rebuild

Unfortunately, this does not seem to fix the issue anymore on 5.42.1. Have had to disable the org.civicrm.contactlayout extension as it renders CiviCRM non-functional.

@laryn
Copy link

laryn commented Mar 22, 2022

I just upgraded a site and I'm seeing this BAO for ContactLayout is not available. This could be a load-order issue error when trying to view a contact as well. Rebuilding the menu doesn't solve it. @agileware-justin did you figure anything out here?

@laryn
Copy link

laryn commented Mar 22, 2022

Update. This seems to have been caused in our case by the fact that a few extensions were missing from the filesystem (one that was enabled and missing, and one that was disabled and missing). I replaced the code for those missing extensions, re-enabled Contact Layout, and then I was able to view a contact as usual. (I suppose it could also have been disabling and re-enabling CL for that matter).

@agileware-justin
Copy link

@laryn standard procedure is to take out the "Little book of calm", chew on that for a few minutes. Then clear all caches and temporary files on the file system, reload and repeat until the error message goes away.

@laryn
Copy link

laryn commented Mar 22, 2022

Nom nom nom

@kenorb
Copy link

kenorb commented May 5, 2023

Same, upgrade to 5.42.1 broke something (upgrading further to 5.43.2 didn't work either). The error happens on local env after imported the db from another server where the upgrade seemed to worked. Going to /civicrm/contact/view?reset=1&cid=1 generates silent error (not even logged in Drupal watchdog table):

BAO for ContactLayout is not available. This could be a load-order issue.

I did strace and the last query that was executed is SELECT path, data, UNIX_TIMESTAMP(expired_date) as expires FROM civicrm_cache WHERE group_name = "metadata" AND path = "api4.ContactLayout.info"; from modules/civicrm-ext/org.civicrm.contactlayout/Civi/Api4/ContactLayout.php. On the other hand, on another server, 5.42 seems to be fine. This could be related to some of the missing extensions despite the codebase is the same. Clearing caches, removing cache templates, or civicrm_cache table manually didn't help.

Stack trace:

civicrm/civicrm-core/Civi/Api4/Generic/DAOGetAction.php:90 <- run at civicrm/civicrm-core/Civi/Api4/Provider/ActionObjectProvider.php <- invoke at civicrm/civicrm-core/Civi/API/Kernel.php <-runRequest at civicrm/civicrm-core/Civi/Api4/Generic/AbstractAction.php <- execute at modules/civicrm-ext/org.civicrm.contactlayout/CRM/Contactlayout/BAO/ContactLayout.php <- getLayout at modules/civicrm-ext/org.civicrm.contactlayout/contactlayout.php <- contactlayout_civicrm_pageRun at vendor/civicrm/civicrm-core/CRM/Utils/Hook.php <- ...

Uninstalling extension solves the problem (cv ext:uninstall contactlayout), re-enabling - problem persist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants