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

CRM-20502 - Do not get custom group tree into cache if we are upgrading #444

Merged
merged 2 commits into from
Apr 30, 2017

Conversation

seamuslee001
Copy link
Contributor

@seamuslee001 seamuslee001 commented Apr 29, 2017

@totten totten changed the title Do not get custom group tree into cache if we are upgrading CRM-20502 - Do not get custom group tree into cache if we are upgrading Apr 29, 2017
@@ -304,6 +304,9 @@ function civicrm_views_add_date_arguments(&$data, $value) {
* Array with the new custom field appended
*/
function civicrm_views_custom_data_cache(&$data, $entity_type, $group_id, $sub_type) {
if (!CRM_Core_Config::isUpgradeMode()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@totten should it actually be if (CRM_Core... not the negating?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right - this 'works' because it is ALWAYS returning!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented on Mattermost - but will confirm here too that this indeed does work! :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KarinG are you able to test changing the if to be if (CRM_Core_Config::isUpgradeMode())

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KarinG @eileenmcnaughton i have just changed it to remove the ! as i tested it and didn't seem to make a difference and i think is the actual correct thing we should be testing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seamuslee001 so if it doesn't seem to make a difference whether ! or not - then how can we get to the rest of this function if we're not upgrading?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so i tested in upgrade and it made no difference i think that removing the ! will make a difference in non upgrade times

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think you wound up with the correction formulation (short-circuit the request in upgrade mode).

@eileenmcnaughton
Copy link
Contributor

This makes sense but, as discussed can you try to get some more people to test.

@eileenmcnaughton eileenmcnaughton merged commit 262ca60 into civicrm:7.x-4.7.19-rc Apr 30, 2017
@eileenmcnaughton
Copy link
Contributor

NB I mean test on the rc with this merged - not the PR

@seamuslee001 seamuslee001 deleted the 7.x-4.7.19-rc branch April 30, 2017 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants