• Resolved Chris

    (@renaissancedesign)


    After reverting to PHP7.4 to fix the previous compatibility error donations via Stripe work, but only for logged in WP users. When logged out of the Dashboard and trying to use Stripe, I get:

    [22-Jul-2022 15:41:35 UTC] PHP Notice: Undefined index: in /nas/content/live/purposefounder/wp-content/plugins/give/src/Form/Templates.php on line 112
    [22-Jul-2022 15:41:35 UTC] PHP Fatal error: Uncaught Error: Class name must be a valid object or a string in /nas/content/live/purposefounder/wp-content/plugins/give/src/Form/Templates.php:112
    Stack trace:
    #0 /nas/content/live/purposefounder/wp-content/plugins/give/src/Form/Templates.php(98): Give\Form\Templates->getTemplateObject(NULL)
    #1 /nas/content/live/purposefounder/wp-content/plugins/give/src/Controller/Form.php(125): Give\Form\Templates->getTemplate()
    #2 /nas/content/live/purposefounder/wp-includes/class-wp-hook.php(307): Give\Controller\Form->loadDonationFormView(”)
    #3 /nas/content/live/purposefounder/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #4 /nas/content/live/purposefounder/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #5 /nas/content/live/purposefounder/wp-includes/template-loader.php(13): do_action(‘template_redire…’)
    #6 /nas/content/live/purposefounder/wp-blog-header.php(19): require_once(‘/nas/content/li…’)
    #7 /nas/content/live/purposefounder/index.php(17): require(‘/nas/content/li…’)
    #8 {m in /nas/content/live/purposefounder/wp-content/plugins/give/src/Form/Templates.php on line 112

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Chris

    (@renaissancedesign)

    Update: turns out the install was hiding update notifications. Have now updated to v2.21.4 and it’s no longer throwing a fatal error, but the confirmation page is still not displaying when a logged out user makes a donation. When there’s a logged in WP user the confirmation page displays correctly.

    Disabling cache makes no difference, GiveWP site status raises no issues.

    The only entry in the WP debug log related to the plugin is now:

    
    [22-Jul-2022 17:17:26 UTC] PHP Notice:  Undefined index: donor_id in /nas/content/live/purposefounstg/wp-content/plugins/give/includes/donors/actions.php on line 25
    • This reply was modified 2 years, 4 months ago by Chris.
    Plugin Support Rick Alday

    (@mrdaro)

    Hi Chris,

    That error and the fact that it works for logged-in users means that something is breaking the PHP session on the site. GiveWP uses PHP sessions to ensure that donors only have access to their own donation data (among other things). We have a detailed document that explains what a PHP session is, and how you can troubleshoot broken sessions: https://givewp.com/documentation/core/frequent-troubleshooting-issues/understanding-troubleshooting-user-access/

    The number one thing that causes sessions to mess up is caching. We also have a far-more-information-than-you-bargained-for article about caching and how you can leverage it on your GiveWP-powered website: https://givewp.com/documentation/resources/caching/

    If donors are getting the message you mentioned, it’s almost always an indication that the caching happening on your site on that page is pulling over the session from a previous visitor. Please note that clearing cache will not solve the issue.

    I don’t know if you are using any caching plugins, but something either at the host level (it’s always a good idea to reach out to your host) or in some other plugin is likely caching things and needs to be excluded from the list here.

    Thread Starter Chris

    (@renaissancedesign)

    It’s going to be something to do with the host’s cache, because I’ve already tried disabling the cache plugin I found.

    Per their docs here:

    Caching cannot be fully disabled on your website, or on your website’s homepage, as this will negatively impact your site’s performance.

    The donation form is loaded into an iframe by a button appearing in the sitewide header. Apparently I can create exclusions by path, argument or cookie, do you have a list of what I should exclude to get this working? Is the list in your cache FAQ comprehensive?

    Plugin Support Rick Alday

    (@mrdaro)

    Caching is handled differently on various sites and web hosts, and most of them allow for excluding specific URLs or parts of URLs from caching. At the very least, you should exclude the following slugs from caching:
    /donations/
    /donation-confirmation/
    /donor-dashboard/

    Also, the following query strings:
    give-embed=donor-dashboard
    giveDonationFormInIframe=1

    Hope it helps!

    Thread Starter Chris

    (@renaissancedesign)

    That nailed it, nice one.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ANOTHER fatal error’ is closed to new replies.