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

Fix for dev/core#428: Fatal error in Activity Details report when Sorting uses Section Header #12915

Conversation

twomice
Copy link
Contributor

@twomice twomice commented Oct 9, 2018

Overview

This PR corrects a bug in the Activity Details report, in which a fatal error is caused by setting "Section header" for a column under the "Sort" tab.

Before

In the Activity Details report, a fatal error is caused by setting "Section header" for a column under the "Sort" tab.

After

No more fatal error.

Technical Details

Currently, the activity Details report assumes the name of a temporary table is stored in $this->temporaryTables['activity_temp_table'], but that's really an array. The table name is actually stored in $this->temporaryTables['activity_temp_table']['name']. This PR fixes that.

Comments

(none)

@civibot
Copy link

civibot bot commented Oct 9, 2018

(Standard links)

@civibot civibot bot added the master label Oct 9, 2018
@twomice twomice changed the title Fix for dev/core#428. Fix for dev/core#428: Fatal error in Activity Details report when Sorting uses Section Header Oct 9, 2018
@ErikHommel
Copy link
Contributor

@twomice as far as I can see the tests failed? Is that correct?

@twomice
Copy link
Contributor Author

twomice commented Oct 10, 2018

@ErikHommel Those 7 tests are failing with all the PRs I've reviewed recently. They're also testing things that seem very far removed from the scope of this change, so I'm virtually positive they're unrelated to this PR.

@ErikHommel
Copy link
Contributor

@twomice Cool, I have already asked for a reviewer....:-)

@eileenmcnaughton
Copy link
Contributor

@twomice can you put this against the rc as a recent regression

@MarshCastle
Copy link

I just tried this patch on a civibuild drupal-demo, but although the patch does fix the issue it seems to have created an error on every page load:

Strict warning: Declaration of CRM_Volunteer_Permission::check() should be compatible with CRM_Core_Permission::check($permissions, $contactId = NULL) in CRM_Core_ClassLoader::loadClass() (line 218 of /home/marsh/bknix/build/drupal-demo/sites/all/modules/civicrm/CRM/Core/ClassLoader.php).

I'll try again just to be sure...

@MarshCastle
Copy link

Yep - confirmed:

  • removed the patch, and the functionality is broken
  • replace the patch and the issue is fixed, but there's an error on the Activity Report page (/civicrm/report/instance/3)

@twomice
Copy link
Contributor Author

twomice commented Oct 16, 2018

Jenkins test this please.

@twomice
Copy link
Contributor Author

twomice commented Oct 16, 2018

Hi @eileenmcnaughton I'm not sure what you mean by "put this against the rc as a recent regression". Can you restate?

@eileenmcnaughton
Copy link
Contributor

@twomice can you rebase the patch over the 5.7 branch and change the pr to be against the 5.7 branch. That way it will be in the November release - which makes sense as it is a fix for a recent regression. (Optionally we could drop a 5.6.x release but we'll make that call once it's merged to 5.6 & - we take into account things like how far through the the month we are, how old the regression is & whether there are other things to go out)

@twomice twomice force-pushed the 428_activity_report_fatal_section_headers branch from 3639edc to d3e87a8 Compare October 16, 2018 21:50
@twomice twomice changed the base branch from master to 5.7 October 16, 2018 21:50
@civibot civibot bot added 5.7 and removed master labels Oct 16, 2018
@twomice
Copy link
Contributor Author

twomice commented Oct 16, 2018

@eileenmcnaughton I think this is where i always get tripped up. Is this right?

@eileenmcnaughton
Copy link
Contributor

@twomice it's a little bit right & a lot wrong. 2 ways to fix it
1)git rebase -i origin/5.7
(& delete all the patches except this one)
2) git reset --hard origin/5.7
followed by a git cherry-pick of your commit

either way you need to do a git push -f to push it up afterwards

hint
git reflog
will help you find a commit if you lose the commit hash doing git reset --hard (which resets you git pointer & your files to the commit you point to.

@twomice twomice force-pushed the 428_activity_report_fatal_section_headers branch from d3e87a8 to ab663ec Compare October 17, 2018 15:35
@twomice
Copy link
Contributor Author

twomice commented Oct 17, 2018

Thanks @eileenmcnaughton ! Done. Please prompt me if it needs something more.

@eileenmcnaughton
Copy link
Contributor

thanks @twomice ! merging

@eileenmcnaughton eileenmcnaughton merged commit 155390c into civicrm:5.7 Oct 17, 2018
@twomice twomice deleted the 428_activity_report_fatal_section_headers branch December 27, 2018 18:13
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.

4 participants