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

Add basic contribution example base for contribution workflows #22636

Merged
merged 1 commit into from
Feb 6, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Jan 27, 2022

Overview

Add basic contribution example base for contribution workflows

The examples have very little exposed tokens so not much is visible - but
it is a start....

Before

Attempting to preview any of the contribution templates, with message admin extension enabled, gives an error

After

A preview page loads - there is not much to see as yet other than some contact data.

Technical Details

Note the Contribution tokens, unlike contact, don't take input of
already loaded data - fixing that will allow quite a lot more stuff to show up (at least where we are using tokens). That would be a good next step

Comments

Note there is some caching so testing this & then pulling the patch & re-testing will not work I use

--- a/Civi/Test/ExampleDataLoader.php
+++ b/Civi/Test/ExampleDataLoader.php
@@ -40,7 +40,7 @@ class ExampleDataLoader {
       $cache = \CRM_Utils_Constant::value('CIVICRM_TEST') ? new \CRM_Utils_Cache_NoCache([]) : \Civi::cache('long');
       $cacheKey = \CRM_Utils_String::munge(__CLASS__);
       $this->metas = $cache->get($cacheKey);
-      if ($this->metas === NULL) {
+      if (1 || $this->metas === NULL) {
         $this->metas = $this->findMetas();
         $cache->set($cacheKey, $this->metas);
       }

@civibot
Copy link

civibot bot commented Jan 27, 2022

(Standard links)

The examples have very little exposed tokens so not much is visible - but
it is a start....

Note the Contribution tokens, unlike contact, don't take input of
already loaded data - which is a todo to improve this
@colemanw
Copy link
Member

colemanw commented Feb 6, 2022

This feels like a low-risk merge because it's just an example file and some setter functions.

@colemanw colemanw merged commit 8990a43 into civicrm:master Feb 6, 2022
@colemanw colemanw deleted the exampley branch February 6, 2022 06:48
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.

2 participants