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

Feature request: pass $job as a parameter to <token>_civitoken_get() #33

Closed
mecachisenros opened this issue Jul 15, 2019 · 5 comments
Closed

Comments

@mecachisenros
Copy link
Contributor

I have one more request @eileenmcnaughton but want to ask/explain the use case first, before opening a PR.

Currently the <token>_civitoken_get() function doesn't include the $job param (job_id), in some use cases it's very useful (or necessary) to have to the job_id for generating tracked URLs for some dynamic content, ie blog posts, etc.

My proposal is to add $job as the last parameter so that any current custom implementations of tokens using this fantastic extension don't break, from $fn($contactID, $value, $context) to $fn($contactID, $value, $context, $job).

If you agree I'll prepare a PR right away.

@eileenmcnaughton
Copy link
Owner

@mecachisenros that seems fine to me - I think it would be non breaking & if it helps you I'm ok with it

tangental @pfigel asked me

"

Whenever the extension is enabled the tokens provided by the extension are working quite fine but all the other CiviCRM-native tokens are not working anymore."

I don't recall that being an issue but haven't dug in to check - since you have your head in this code right now do you know if it is an issue in your use cases?

@mecachisenros
Copy link
Contributor Author

Thanks @eileenmcnaughton I'll create a PR.

other CiviCRM-native tokens are not working anymore

CiviCRM-native tokens work as expected, I haven't came across that, but happy to test/take a stab at, does @pfigel have any more details?

I'm gonna have a look at the #22 as well

@mecachisenros
Copy link
Contributor Author

@eileenmcnaughton I've tested both CiviCRM-native, and tokens added from other extensions via hook_civicrm_tokens and hook_civicrm_tokenValues, all work as expected.

I do remember an issue in the GDPR extension in the past breaking tokens, so perhaps they have an old version of the extension?

@eileenmcnaughton
Copy link
Owner

@mecachisenros I think this is closed & merged

@mecachisenros
Copy link
Contributor Author

Many thanks @eileenmcnaughton

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

2 participants