• Resolved Adil556

    (@flaxtrade)


    Hi,

    The latest version of Give doesn’t work and crashes my site.

    Can you investigate?

    I’m not using Field Form plugin.

    This is the error msg

    Version 2.28.0 | By GiveWP | View details
     This plugin failed to load properly and is paused during recovery mode.
    
    An error of type E_ERROR was caused in line 61 of the file /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Framework/FieldsAPI/Concerns/Macroable.php. Error message: Uncaught BadMethodCallException: Method getEmailTag::Give\Framework\FieldsAPI\Checkbox does not exist in /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Framework/FieldsAPI/Concerns/Macroable.php:61 Stack trace: #0 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Form/LegacyConsumer/Commands/SetupFieldEmailTag.php(44): Give\Framework\FieldsAPI\Field->__call() #1 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Framework/FieldsAPI/Concerns/WalkNodes.php(47): Give\Form\LegacyConsumer\Commands\SetupFieldEmailTag->register() #2 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Form/LegacyConsumer/Commands/SetupFieldEmailTag.php(29): Give\Framework\FieldsAPI\Group->walkFields() #3 [internal function]: Give\Form\LegacyConsumer\Commands\SetupFieldEmailTag->__invoke() #4 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Form/LegacyConsumer/TemplateHooks.php(42): array_walk() #5 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Form/LegacyConsumer/ServiceProvider.php(97): Give\Form\LegacyConsumer\TemplateHooks->walk() #6 /home/y0rkv1k1ng/public_html/wp-includes/class-wp-hook.php(308): Give\Form\LegacyConsumer\ServiceProvider->Give\Form\LegacyConsumer\{closure}() #7 /home/y0rkv1k1ng/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #8 /home/y0rkv1k1ng/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #9 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/includes/emails/class-give-email-tags.php(327): do_action() #10 /home/y0rkv1k1ng/public_html/wp-includes/class-wp-hook.php(308): give_load_email_tags() #11 /home/y0rkv1k1ng/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #12 /home/y0rkv1k1ng/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #13 /home/y0rkv1k1ng/public_html/wp-settings.php(623): do_action() #14 /home/y0rkv1k1ng/public_html/wp-config.php(99): require_once('/home/y0rkv1k1n...') #15 /home/y0rkv1k1ng/public_html/wp-load.php(50): require_once('/home/y0rkv1k1n...') #16 /home/y0rkv1k1ng/public_html/wp-admin/admin.php(34): require_once('/home/y0rkv1k1n...') #17 /home/y0rkv1k1ng/public_html/wp-admin/plugins.php(10): require_once('/home/y0rkv1k1n...') #18 {main} thrown
Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Adil556

    (@flaxtrade)

    Same issue with 2.29.0

    Version 2.29.0 | By GiveWP | View details

     This plugin failed to load properly and is paused during recovery mode.

    An error of type E_ERROR was caused in line 61 of the file /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Framework/FieldsAPI/Concerns/Macroable.php. Error message: Uncaught BadMethodCallException: Method getEmailTag::Give\Framework\FieldsAPI\Checkbox does not exist in /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Framework/FieldsAPI/Concerns/Macroable.php:61 Stack trace: #0 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Form/LegacyConsumer/Commands/SetupFieldEmailTag.php(44): Give\Framework\FieldsAPI\Field->__call() #1 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Framework/FieldsAPI/Concerns/WalkNodes.php(47): Give\Form\LegacyConsumer\Commands\SetupFieldEmailTag->register() #2 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Form/LegacyConsumer/Commands/SetupFieldEmailTag.php(29): Give\Framework\FieldsAPI\Group->walkFields() #3 [internal function]: Give\Form\LegacyConsumer\Commands\SetupFieldEmailTag->__invoke() #4 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Form/LegacyConsumer/TemplateHooks.php(42): array_walk() #5 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/src/Form/LegacyConsumer/ServiceProvider.php(97): Give\Form\LegacyConsumer\TemplateHooks->walk() #6 /home/y0rkv1k1ng/public_html/wp-includes/class-wp-hook.php(308): Give\Form\LegacyConsumer\ServiceProvider->Give\Form\LegacyConsumer\{closure}() #7 /home/y0rkv1k1ng/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #8 /home/y0rkv1k1ng/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #9 /home/y0rkv1k1ng/public_html/wp-content/plugins/give/includes/emails/class-give-email-tags.php(327): do_action() #10 /home/y0rkv1k1ng/public_html/wp-includes/class-wp-hook.php(308): give_load_email_tags() #11 /home/y0rkv1k1ng/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #12 /home/y0rkv1k1ng/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #13 /home/y0rkv1k1ng/public_html/wp-settings.php(623): do_action() #14 /home/y0rkv1k1ng/public_html/wp-config.php(99): require_once('/home/y0rkv1k1n...') #15 /home/y0rkv1k1ng/public_html/wp-load.php(50): require_once('/home/y0rkv1k1n...') #16 /home/y0rkv1k1ng/public_html/wp-login.php(12): require('/home/y0rkv1k1n...') #17 {main} thrown

    Reverted back to 2.27.2 which works just fine

    • This reply was modified 1 year, 5 months ago by Adil556.

    I’ve been having the same problem and was hoping version 2.29.0 would be the fix. Thanks for the heads up!

    Same problem here with 2.29.0, on three different sites. I’ve reverted back to 2.27.2.

    Plugin Support Matheus Martins

    (@matheusfd)

    Hey @flaxtrade.

    Glad you reached out.

    Are you creating custom fields using custom code on your website? Since the error says “Checkbox does not exist”and comes from the Fields API, I want to check it.

    Looking forward to helping you get to the bottom of this!

    Thread Starter Adil556

    (@flaxtrade)

    Hi Matheus,

    It appears that was the case and after removing custom field I was able to update the plugin.

    Now I’m unable to add the custom field with the following error, do you have a fix for that please?

    Your PHP code changes were rolled back due to an error on line 61 of file wp-content/plugins/give/src/Framework/FieldsAPI/Concerns/Macroable.php. Please fix and try saving again.
    
    Uncaught BadMethodCallException: Method getEmailTag::Give\Framework\FieldsAPI\Checkbox does not exist in wp-content/plugins/give/src/Framework/FieldsAPI/Concerns/Macroable.php:61
    Stack trace:
    #0 wp-content/plugins/give/src/Form/LegacyConsumer/Commands/SetupFieldEmailTag.php(44): Give\Framework\FieldsAPI\Field->__call()
    #1 wp-content/plugins/give/src/Framework/FieldsAPI/Concerns/WalkNodes.php(47): Give\Form\LegacyConsumer\Commands\SetupFieldEmailTag->register()
    #2 wp-content/plugins/give/src/Form/LegacyConsumer/Commands/SetupFieldEmailTag.php(29): Give\Framework\FieldsAPI\Group->walkFields()
    #3 [internal function]: Give\Form\LegacyConsumer\Commands\SetupFieldEmailTag->__invoke()
    #4 wp-content/plugins/give/src/Form/LegacyConsumer/TemplateHooks.php(42): array_walk()
    #5 wp-content/plugins/give/src/Form/LegacyConsumer/ServiceProvider.php(97): Give\Form\LegacyConsumer\TemplateHooks->walk()
    #6 wp-includes/class-wp-hook.php(308): Give\Form\LegacyConsumer\ServiceProvider->Give\Form\LegacyConsumer\{closure}()
    #7 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #8 wp-includes/plugin.php(517): WP_Hook->do_action()
    #9 wp-content/plugins/give/includes/emails/class-give-email-tags.php(327): do_action()
    #10 wp-includes/class-wp-hook.php(308): give_load_email_tags()
    #11 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #12 wp-includes/plugin.php(517): WP_Hook->do_action()
    #13 wp-settings.php(623): do_action()
    #14 wp-config.php(99): require_once('/home/y0rkv1k1n...')
    #15 wp-load.php(50): require_once('/home/y0rkv1k1n...')
    #16 wp-admin/admin.php(34): require_once('/home/y0rkv1k1n...')
    #17 wp-admin/theme-editor.php(10): require_once('/home/y0rkv1k1n...')
    #18 {main}
      thrown

    I tried 2.29.1 but it is still causing a fatal error. I am getting this error:

    Declaration of Give\Framework\FieldsAPI\Concerns\ShowInReceipt::showInReceipt($showInReceipt = true): Give\Framework\FieldsAPI\Concerns\ShowInReceipt must be compatible with Give\Framework\FieldsAPI\Field::showInReceipt($showInReceipt = true): Give\Framework\FieldsAPI\Field

    Update: Nevermind! It worked this time when Form Field editor was updated first. Thanks.

    • This reply was modified 1 year, 5 months ago by zepplin.
    Plugin Support Matheus Martins

    (@matheusfd)

    Hi, @flaxtrade.

    It would be important to check what code you are trying to add. Please send it here so we can test it.

    ?Also, please send along your System Info.

    Navigate to Donations –> Tools –> System Info (tab) and click the button to “Get System Report” and copy/paste that in your reply here.

    That will give me some more context to be able to help.

    Thread Starter Adil556

    (@flaxtrade)

    Hi Matheus,

    Here is the code that is still working with 2.27.2

    // Add the Address and postcode fields
    add_action( 'give_fields_donation_form_after_personal_info', function( $group ) {
        $group->append(
            give_field( 'text', 'address' )
                ->showInReceipt()
                ->minLength(2)
                ->label( __( 'Address' ))
                ->maxLength(30)
                ->placeholder('Address - required for Gift Aid donors') 
                ->storeAsDonorMeta()
                ->helpText( __( 'This field is only required for Gift Aid donors' ) ) //how this is displayed is up to the template, but if the template has help text displayed, this is how to set it.
        );
    });
    add_action( 'give_fields_donation_form_after_personal_info', function( $group ) {
        $group->append(
            give_field( 'text', 'PostCode' )
                ->showInReceipt()
                ->minLength(2)
                ->label( __( 'Post Code' ))
                ->maxLength(30)
                ->placeholder('Post Code - required for Gift Aid donors') 
                ->storeAsDonorMeta()
                ->helpText( __( 'This field is only required for Gift Aid donors' ) ) //how this is displayed is up to the template, but if the template has help text displayed, this is how to set it.
        );
    });
    // Add checkbox to donation form before credit card field
    add_action( 'give_fields_donation_form_before_cc_form', function( $collection ) {
        $collection->append(
            give_field( 'checkbox', 'ukTax' )
    		->showInReceipt()
    		->label( __( 'Gift Aid. Yes, I am a UK Tax Payer and I would like the York Vikings Rotary Club to reclaim the tax on all qualifying donations I have made, as well as any future donations, until I notify them otherwise.' ))
        );
    });
    
    // Add the ukTax checkbox to donations in the backend
    function render_givewp_field_api_fields( $payment_id ) {
    	$field_name = give_get_meta( $payment_id, 'ukTax', true );
    
    	if ( $field_name ) : ?>
    		<div id="Tax" class="postbox">
    			<h3 class="handle">This is a Gift Aid donation</h3>
    			<div class="inside" style="padding-bottom:10px">
    			</div>
    		</div>
    	<?php endif;
    }
    
    add_action( 'give_view_donation_details_billing_after', 'render_givewp_field_api_fields', 10, 1 );

    and here is the system info report

    ### WordPress Environment ###
    
    Home URL: https://www.yorkvikingsrotary.org
    Site URL: https://www.yorkvikingsrotary.org
    WP Version: 6.2.2
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    Permalink Structure: /%category%/%postname%/
    Show on Front: page
    Page on Front: York Vikings (#2642)
    Page for Posts: News (#17834)
    Table Prefix Length: wpiy_
    Table Prefix Length: 5
    Table Prefix Status: Acceptable
    Admin AJAX: Accessible
    Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, acf-disabled, refunded, failed, revoked, cancelled, abandoned, processing, preapproval, tribe-ea-success, tribe-ea-failed, tribe-ea-schedule, tribe-ea-pending, tribe-ea-draft, tribe-ignored
    
    ### Server Environment ###
    
    Hosting Provider: DBH: localhost, SRV: www.yorkvikingsrotary.org
    TLS Connection: Connection uses TLS 1.3
    TLS Connection: Probably Okay
    Server Info: LiteSpeed
    PHP Version: 8.1.18
    PHP Post Max Size: 512 MB
    PHP Time Limit: 300
    PHP Max Input Vars: 8000
    PHP Max Upload Size: 512 MB
    cURL Version: 7.87.0, OpenSSL/1.1.1p
    SUHOSIN Installed: –
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    gzip: ?
    GD Graphics Library: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### GiveWP Configuration ###
    
    GiveWP Version: 2.29.0
    GiveWP Cache: Enabled
    Database Updates: All DB Updates Completed.
    Database Updates: All Database Migrations Completed.
    Database Tables: ? wpiy_give_donors? wpiy_give_donormeta? wpiy_give_comments? wpiy_give_commentmeta? wpiy_give_sessions? wpiy_give_formmeta? wpiy_give_sequential_ordering? wpiy_give_donationmeta? wpiy_give_revenue? wpiy_give_migrations? wpiy_give_log
    GiveWP Cache: Enabled
    GiveWP Cache: ?New Donation?Donation Receipt?Donation Processing Receipt?New Offline Donation?Offline Donation Instructions?New User Registration?User Registration Information?Donation Note?Email access
    Upgraded From: 2.28.0
    Test Mode: Disabled
    Currency Code: GBP
    Currency Position: Before
    Decimal Separator: .
    Thousands Separator: ,
    Success Page: https://www.yorkvikingsrotary.org/donation-confirmation/
    Failure Page: https://www.yorkvikingsrotary.org/donation-failed/
    Donation History Page: https://www.yorkvikingsrotary.org/donation-history-2/
    GiveWP Forms Slug: /donations/
    Enabled Payment Gateways: Stripe - Credit Card
    Default Payment Gateway: Stripe - Credit Card
    PayPal IPN Notifications: N/A
    Donor Email Access: Enabled
    Stripe Webhook Notifications: May 24, 2023 8:15 am
    
    ### Active GiveWP Add-ons ###
    
    
    ### Other Active Plugins ###
    
    Advanced Custom Fields: Font Awesome: by Matt Keys – 4.0.5
    Advanced Custom Fields PRO: by Delicious Brains – 6.1.6
    ARMember Lite - Membership Plugin: by Repute InfoSystems – 4.0.4
    Bearsthemes Addons: by Bearsthemes – 3.0.0
    Elementor: by Elementor.com – 3.14.0
    Elementor Pro: by Elementor.com – 3.13.2
    Google Analytics for WordPress by MonsterInsights: by MonsterInsights – 8.16
    Imagify: by Imagify – Optimize Images & Convert WebP – 2.1.1
    Kirki Customizer Framework: by Themeum – 4.2.0
    ManageWP - Worker: by GoDaddy – 4.9.17
    The Events Calendar: by The Events Calendar – 6.1.1
    UberMenu 3 - The Ultimate WordPress Mega Menu: by Chris Mavricos, SevenSpark – 3.7.3
    Wordfence Security: by Wordfence – 7.9.3
    WPCode Lite: by WPCode – 2.0.12
    WP Rocket: by WP Media – 3.14
    Yoast SEO: by Team Yoast – 20.9
    
    ### Inactive Plugins ###
    
    Akismet Anti-Spam: by Automattic – 5.1
    Bears Backup: by Bearsthemes – 2.0.0
    Hello Dolly: by Matt Mullenweg – 1.7.2
    Site Offline: by Chandra Shekhar Sahu – 1.5.6
    Smash Balloon Custom Facebook Feed: by Smash Balloon – 4.1.8
    
    ### Active MU Plugins ###
    
    ManageWP - Worker Loader: by GoDaddy – 1.0.0
    
    ### Theme ###
    
    Name: Alone
    Version: 7.5
    Author URL: https://themeforest.net/user/bearsthemes/
    Child Theme: No – If you're modifying GiveWP on a parent theme you didn't build personally, then we recommend using a child theme. See: How to Create a Child Theme
    

    Thanks

    Plugin Support Matheus Martins

    (@matheusfd)

    Hi, @flaxtrade.

    ?We’ve investigated it and we found that you’ve uncovered an edge-case issue with the Fields API. What is happening is that we refactored the code to make it compatible with GiveWP 3.0 which is coming, and it will include huge changes. We made sure to make it backward-compatible but from what we saw, we still need to polish it to make sure it works.

    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/the-checkbox-field-creation-using-the-fields-api-should-work.

    ??We are actively tracking user issues to make sure our dev team is aware of them and can get them fixed. You can use the link to check in for updates or to provide additional details of your own.

    Give the post above a look, and let me know if you would like me to add any additional details. I want to ensure your need is as accurately reflected as possible, and I’m happy to include an internal note to our teams with any specific information you would like them to have.

    The only workaround I know of is to stay on GiveWP 2.27.2. I would prefer to update it to the latest version and use our Form Field Manager add-on to create the checkbox field.

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

    Thread Starter Adil556

    (@flaxtrade)

    Thanks @matheusfd hopefully this will be an easy fix

    Looking forward to the v3.0

    • This reply was modified 1 year, 4 months ago by Adil556.
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Version 2.28.0 broke my site’ is closed to new replies.