- Issue created by @nelslynn
- πΊπΈUnited States nelslynn
Here's more information on what is not working with this module using both these configs:
Drupal 8.1.31, Give 2.0.0-Beta6
Drupal 10.3.10, Give 2.0.0-Beta6When you use zeros in the "Interval" fields, the form still defaults to a recurring donation requirement. The note on the config page states that if you use zeros the form can function as a one-time donation... doesn't work
The second and more serious issue is if you remove the Interval lines, you get a white screen of death after submitting the donation form.
I found an ambiguity where a one-off donation AND the first in the list of donation frequencies are both represented as 0 in the donation->recurring column.
My solution is to make the one-off donation -1.
Zeros are no longer allowed in the interval column.
I pushed the solution to HEAD with some related improvements especially in the give form edit form.
I wrote function give_update_10000() to update all the previous donations, however there's no way in the data to distinguish between those one-off donations and the recurring donations which used the first defined recurrence in the GiveForm. So the update assumes that ALL donations with a 'recurring' value of 0 were one-offs.
Can you test and see if the WSOD is resolved?- πΊπΈUnited States nelslynn
Get this error now using Drupal Drupal 10.3.10 and Give dev version:
Error: Cannot unset string offsets in Drupal\Core\Field\WidgetBase->extractFormValues() (line 491 of public_html/website/web/core/lib/Drupal/Core/Field/WidgetBase.php). Please provide more information.
Did you resave the give_form settings on admin/structure/give/
What are those give_form settings?
What values did you put in the donation form?- πΊπΈUnited States nelslynn
This is all my developer told me. He did get it working with a modified install.php file. I will attached this file.
I tested an anonymous donation on my machine and it was ok
Your developer should be posting these issues directly.
I can't imagine how a modified install.php file would help, but you didn't attach it...
Please note I'm not the developer of this module, I only patched it up well enough to serve my own purposes.- πΊπΈUnited States nelslynn
Are you speaking about the dev version of the Give Module?
What version of Drupal are you using?
Did you use a live credit card and did the transaction go through successfully?
I've been testing with the cheque method on my local machine with the latest dev version. I haven't set up a credit card.
If you ever see the message:
"The website encountered an unexpected error. Try again later."
It means there are more details on admin/reports/dblog, if the database logging module is enabled.- πΊπΈUnited States MegaKeegMan
I attempted updating past the 2.0.0-beta6 release, and found that some of the changes in the code are preventing me from running database updates. This is on Drupal 10.4.1
I can verify that it is not related to database hook 10000, as I could run that hook, experience failures on other update hooks, revert my give code to 2.0.0-beta6, and then run those same update hooks successfully.
Here are at least the first few lines of that error: > [notice] Update started: views_post_update_pager_heading > [error] ArgumentCountError: Too few arguments to function Drupal\Core\StringTranslation\TranslatableMarkup::__construct(), 0 passed and at least 1 expected in Drupal\Core\StringTranslation\TranslatableMarkup->__construct() (line 129 of /var/www/html/web/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php) #0 [internal function]: Drupal\Core\StringTranslation\TranslatableMarkup->__construct() > ArgumentCountError: Too few arguments to function Drupal\Core\StringTranslation\TranslatableMarkup::__construct(), 0 passed and at least 1 expected in /var/www/html/web/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php on line 129 #0 [internal function]: Drupal\Core\StringTranslation\TranslatableMarkup->__construct() > #1 /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/AttributeClassDiscovery.php(144): ReflectionAttribute->newInstance() > #2 /var/www/html/web/core/lib/Drupal/Core/Plugin/Discovery/AttributeDiscoveryWithAnnotations.php(101): Drupal\Component\Plugin\Discovery\AttributeClassDiscovery->parseClass('Drupal\\give\\Plu...', Object(SplFileInfo)) > #3 /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/AttributeClassDiscovery.php(84): Drupal\Core\Plugin\Discovery\AttributeDiscoveryWithAnnotations->parseClass('Drupal\\give\\Plu...', Object(SplFileInfo))
Not sure how this is happening yet, but I assume it is related to changes in usage of t functions.
While update hook 10000 is not the cause of the above problem, I am not so sure about this pattern of setting not recurring to -1.
Would like to look into this some more, but need to look at another module at the moment.