Git Product home page Git Product logo

civicrm_newsletter's People

Contributors

benediktmagnus avatar bjendres avatar dontub avatar jensschuppe avatar jofranz avatar peth-systopia avatar rowo-ds avatar tychoschottelius avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

feyp

civicrm_newsletter's Issues

Implement "unsubscribe all" functionality

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.

Per-profile permissions not available

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.

See systopia/de.systopia.newsletter#10

TypeError if permission "Access CiviCRM-Backend and -API" not set

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)

Filter unchecked values in submitForm

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.