• Resolved happyvisions

    (@happyvisions)


    Hi there. I’ve been using this plugin for a month now, but 3 days ago this critical error happened:

    `An error of type E_ERROR was caused in line 56 of the file /home/happlplt/public_html/wp-content/plugins/give/src/Framework/FieldsAPI/Form.php. Error message: Uncaught Give\Framework\FieldsAPI\Exceptions\TypeNotSupported: Type text is not supported in /home/happlplt/public_html/wp-content/plugins/give/src/Framework/FieldsAPI/Form.php:56
    Stack trace:
    #0 /home/happlplt/public_html/wp-content/plugins/give-text-to-give/src/Registration/Actions/RegisterFormFields.php(67): Give\Framework\FieldsAPI\Form->append()
    #1 /home/happlplt/public_html/wp-content/plugins/give-text-to-give/src/ServiceProviders/FormServiceProvider.php(45): GiveTextToGive\Registration\Actions\RegisterFormFields->init()
    #2 /home/happlplt/public_html/wp-content/plugins/give-text-to-give/src/ServiceProviders/FormServiceProvider.php(36): GiveTextToGive\ServiceProviders\FormServiceProvider->registerFormFields()
    #3 /home/happlplt/public_html/wp-content/plugins/give/give.php(426): GiveTextToGive\ServiceProviders\FormServiceProvider->boot()
    #4 /home/happlplt/public_html/wp-content/plugins/give/give.php(261): Give->loadServiceProviders()
    #5 /home/happlplt/public_html/wp-includes/class-wp-hook.php(307): Give->init()
    #6 /home/happlplt/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #7 /home/happlplt/public_html/wp-includes/plugin.php(476): WP_Hook->do_action()
    #8 /home/happlplt/public_html/wp-settings.php(461): do_action()
    #9 /home/happlplt/public_html/wp-config.php(123): require_once(‘/home/happlplt/…’)
    #10 /home/happlplt/public_html/wp-load.php(50): require_once(‘/home/happlplt/…’)
    #11 /home/happlplt/public_html/wp-admin/admin.php(34): require_once(‘/home/happlplt/…’)
    #12 /home/happlplt/public_html/wp-admin/plugins.php(10): require_once(‘/home/happlplt/…’)
    #13 {main}
    thrown`

    I’ve already attempted to hard delete and reinstall the plugin. However, the critical error is still happening. Can you please advise me on how to proceed?

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter happyvisions

    (@happyvisions)

    Just a quick update: I’ve fixed it by removing the throw exception and continuing the loop. However, please look into this for me!

    I replaced this:

    public function append(Node ...$nodes)
        {
            foreach ($nodes as $node) {
                if ( !$node instanceof Section ) {
                    throw new TypeNotSupported($node->getType());
                }
    
                $this->insertAtIndex($this->count(), $node);
            }
    
            return $this;
        }

    With this:

    public function append(Node ...$nodes)
        {
            foreach ($nodes as $node) {
                if ( !$node instanceof Section ) {
                    continue;
                }
    
                $this->insertAtIndex($this->count(), $node);
            }
    
            return $this;
        }

    Works for now. ??

    Plugin Support Rick Alday

    (@mrdaro)

    Hi @happyvisions,

    This error is happening because you are using an outdated version of the Text to Give add-on. To make sure we are on the same page, please update GiveWP and all its add-ons to the latest version:

    GiveWP 2.21.4.
    Text to Give 1.0.2

    In this case, you can click on Plugins > Installed Plugins and click to update your plugins. If you do not see an update for it, it’s just the cache. You can navigate to Dashboard > Updates and click on Check Again. It will check for the updates and clear the cache and you’ll be able to update the plugin.

    Update Text to Give before GiveWP.

    I’d recommend taking a backup of the site that you can confidently restore from. Here’s an article we wrote that explains more clearly how to do that: https://givewp.com/backup-for-faster-troubleshooting/

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Critical Error on Website’ is closed to new replies.