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 core#1247 - export hook doesn't work #15287

Merged
merged 1 commit into from
Sep 12, 2019

Conversation

MegaphoneJon
Copy link
Contributor

Overview

Export hooks no longer work.

Before

Export hooks don't work.

After

Export hooks work.

Technical Details

#14913 moved the line that calls the hook to a place where the hook's arguments are mostly not defined. This defines the arguments.

Comments

We're deprecating passing some arguments by reference, because this hook is called too late in the process for the changed values to have any meaning.

The original PR against master is #15266, some good discussion there.

@civibot
Copy link

civibot bot commented Sep 11, 2019

(Standard links)

@civibot civibot bot added the master label Sep 11, 2019
@seamuslee001
Copy link
Contributor

my only question @MegaphoneJon @eileenmcnaughton is do we need to set back the Columns and headers array back onto the processor after the hook or does it not matter. Also i don't want to see that being a blocker to this going through

@eileenmcnaughton
Copy link
Contributor

@seamuslee001 it's just about ready to exit at that point

@seamuslee001 seamuslee001 changed the base branch from master to 5.18 September 12, 2019 00:14
@civibot civibot bot added 5.18 and removed master labels Sep 12, 2019
CRM_Utils_Hook::export($exportTempTable, $headerRows, $sqlColumns, $exportMode, $componentTable, $ids);
if ($exportMode !== $this->getExportMode() || $componentTable !== $this->getComponentTable()) {
CRM_Core_Error::deprecatedFunctionWarning('altering the export mode and/or component table in the hook is no longer supported.');
Copy link
Contributor

Choose a reason for hiding this comment

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

@MegaphoneJon so per your discussion it's kinda meaningless to change ids & we are assuming it's safe to be clear about that - shall we change the hook to no longer accept $ids as a reference? (could be in master)

@eileenmcnaughton
Copy link
Contributor

Looks right to me

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

Successfully merging this pull request may close these issues.

3 participants