systopia / civicrm_newsletter Goto Github PK
View Code? Open in Web Editor NEWDrupal module end point for CiviCRM's de.systopia.newsletter
License: GNU Affero General Public License v3.0
Drupal module end point for CiviCRM's de.systopia.newsletter
License: GNU Affero General Public License v3.0
The API will provide an "unsubscribe all" parameter for the NewsletterSubscription.confirm
API action, thus this module should implement that, providing a checkbox on the preferences form which causes this parameter to be sent and hide the group selection in the form.
Because titles are hard-coded in the routing.yml
file. There should be title_callback
keys instead.
There should be permissions for all three forms per profile. This, however, does not work because the API always returns the default profile when no profile name is submitted.
The NewsletterProfile.get
API should return multiple profiles. There should be a NewsletterProfile.getsingle
API action for querying only one profile or the default profile if no name is provided.
This module should then be adapted to use the correct API action.
If the permission "Access CiviCRM-Backend and -API" is not set, the following error occurs when trying to access the subscription form:
TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in count() (line 104 of /srv/www/htdocs/systopia-dev.w21.it/local_packages/civicrm_newsletter/src/Form/SubscriptionForm.php).
Drupal\civicrm_newsletter\Form\SubscriptionForm->buildForm()
call_user_func_array() (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
When submitting a form with multiple options, unchecked fields are submitted as '0', which then cannot be parsed by the API because it's not a valid option.
Example:
Bevorzugte Sprache (Mehrfachnennung möglich)
[ ] Deutsch
[ ] Englisch
[ ] Französisch
[ ] Spanisch
[ ] Italienisch
Error Message:
"error_message": "'0' is not a valid option for field custom_2"
Unchecked values need to be filtered out like it is done with mailing_lists.
Unfortunately the filtering cannot be done for boolean values, or where values with 0 are a valid submission.
systopia-reference: 21198
For a local CiviMRF connector only, it should be possible to omit the contact hash in the URL and default to the currently logged-in user's CiviCRM contact.
To be compatible with de.systopia.newsletter Version 0.7, use group title as the checkboix label.
Additionally, add the (internal) CiviCRM group name as a data-civicrm-group-name
attribute.
Followup to systopia/de.systopia.newsletter/issues/11
The extension uses CiviCRM contact hashes and should use contact checksums instead (because they expire, whereas contact hashes don't) and this module will need to be adjusted for correctly implementing this change.
This is a blocker for a stable 1.0
/7.x-1.0
release.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.