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

Disable the CiviCRM handler during submissions import and create a migrate plugin for D7WebformCivicrmSubmission #8

Open
herbdool opened this issue Apr 4, 2023 · 6 comments · May be fixed by #12

Comments

@herbdool
Copy link

herbdool commented Apr 4, 2023

I just left a comment here https://www.drupal.org/project/webform_civicrm/issues/3320379#comment-14997370 and figured this module might be a good place for dealing with CiviCRM submissions without triggering the whole CiviCRM processing.

This looks like a promising hook:

hook_webform_handler_invoke_alter(\Drupal\webform\Plugin\WebformHandlerInterface $handler, $method_name, array &$args)

If the CiviCRM handler is disabled then there would need to be a submission handler specific for the webform_civicrm_submissions table, similar to D7WebformSubmission in the webform_migrate module.

@jmcclelland
Copy link

Hi @herbdool - I am running into the same problem. I see that you haven't had much luck getting your changes merged in the webform_civicrm module. I was wondering if you figured out a way to address this problem?

@herbdool
Copy link
Author

@jmcclelland I had added my patch to the composer file for the website. But now that it's all migrated don't need the patch. Still it's a shame that they won't merge it. Maybe you can chime in on the issue.

@herbdool
Copy link
Author

@jmcclelland in particular test this PR colemanw/webform_civicrm#894

@jmcclelland
Copy link

@herbdool Thanks for the follow up - I'll definitely chime in. But... how did you disable the webform_civicrm handler just for submission imports? In this ticket you reference hook_webform_handler_invoke_alter(\Drupal\webform\Plugin\WebformHandlerInterface $handler, $method_name, array &$args) but I'm still trying to wrap my head around how to use that hook to disable the handler just for migrating submissions.

@herbdool
Copy link
Author

I think I ended up not using that hook. I just disabled the handler manually for each webform. It can be disabled in the UI or by changing the yml file for the webform and importing config changes.

@jmcclelland jmcclelland linked a pull request May 22, 2024 that will close this issue
@jmcclelland
Copy link

Thanks so much for the feedback. I think I sorted out the hook code and submitted a PR. I'll also follow up on the webform PR.

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

Successfully merging a pull request may close this issue.

2 participants