• Resolved alexanderdigett

    (@alexanderdigett)


    php: 7.4
    wordpress 5.9

    Trying to upgrade give plugin from 2.18.1 to 2.24.0 gives us this error when we go to /wp-admin/edit.php?post_type=give_forms&page=give-updates&type=database

    Fatal error: Uncaught TypeError: Argument 1 passed to Give\DonationForms\Properties\DonationFormLevel::fromPrice() must be of the type string, null given, called in /code/wp-content/plugins/give/src/DonationForms/DataTransferObjects/DonationFormQueryData.php on line 117 and defined in /code/wp-content/plugins/give/src/DonationForms/Properties/DonationFormLevel.php:52 Stack trace: #0 /code/wp-content/plugins/give/src/DonationForms/DataTransferObjects/DonationFormQueryData.php(117): Give\DonationForms\Properties\DonationFormLevel::fromPrice(NULL) #1 /code/wp-content/plugins/give/src/DonationForms/DataTransferObjects/DonationFormQueryData.php(73): Give\DonationForms\DataTransferObjects\DonationFormQueryData->getDonationFormLevels(Object(stdClass)) #2 /code/wp-content/plugins/give/src/DonationForms/Models/DonationForm.php(86): Give\DonationForms\DataTransferObjects\DonationFormQueryData::fromObject(Object(stdClass)) #3 /code/wp-content/plugins/give/src/Framework/Models/ModelQueryBuilder.php(133): Give\DonationForms\Models\Don in /code/wp-content/plugins/give/src/DonationForms/Properties/DonationFormLevel.php on line 52

    I tried some older versions and started running into different error at 2.20.0
    Fatal error: Uncaught Give\Framework\Exceptions\Primitives\InvalidArgumentException: Class must extend the Give\Framework\Migrations\Contracts\Migration class in /code/wp-content/plugins/give/src/Framework/Migrations/MigrationsRegister.php:85 Stack trace: #0 /code/wp-content/plugins/give/src/Framework/Migrations/MigrationsRegister.php(109): Give\Framework\Migrations\MigrationsRegister->addMigration(‘Give\\Log\\Migrat…’) #1 /code/wp-content/plugins/give/src/Log/LogServiceProvider.php(62): Give\Framework\Migrations\MigrationsRegister->addMigrations(Array) #2 /code/wp-content/plugins/give/src/Log/LogServiceProvider.php(42): Give\Log\LogServiceProvider->registerMigrations() #3 /code/wp-content/plugins/give/give.php(480): Give\Log\LogServiceProvider->boot() #4 /code/wp-content/plugins/give/give.php(266): Give->loadServiceProviders() #5 /code/wp-includes/class-wp-hook.php(307): Give->init(”) #6 /code/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #7 /code/wp-includes/plugin.php(474): WP_Hook->do_acti in /code/wp-content/plugins/give/src/Framework/Migrations/MigrationsRegister.php on line 85

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Matheus Martins

    (@matheusfd)

    Hi, @alexanderdigett.

    Glad you reached out. I can help you fix the Forms page.

    We’ve investigated it and we found that you’ve uncovered an edge-case issue with our GiveWP plugin. What is happening is that for some forms, if you have a missing piece of information about the donation values, that page will break.

    I’ve escalated this to our development team so they can work on a fix. You can follow up on the progress of the fix here https://feedback.givewp.com/bug-reports/p/givewp-should-work-even-if-the-price-option-is-missing-for-a-form.

    However, there is a workaround. In the meantime, we’ve created a snippet for switching the new list views to the legacy views for all administrators on a site. To use it, do the following:

    – Add the snippet (linked below) to functions.php or some other place that runs arbitrary PHP. You can use the Code Snippets plugin too.
    – Go to https://example.com/wp-admin/index.php?givewp_set_legacy_lists=1
    – It will redirect you back to the same page, and now the lists should be in the Legacy view.

    Here’s the link to the snippet: https://gist.github.com/rickalday/ffb27e660cd4b1c7b1d9cf92ef696264

    It should solve the issue that is breaking your forms page.

    While we work on a fix, feel free to message us if you have further questions or need any additional assistance!

    Hi @alexanderdigett ,

    ​We are happy to announce the release of GiveWP version 2.24.1, which resolves this issue. Please update as soon as possible, and let us know if you have any issues moving forward. If you have any questions, we are happy to help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error after upgrade’ is closed to new replies.