• Resolved Angela Bowman

    (@askwpgirl)


    When formatting the Donation Confirmation page aka Success page with Elementor, saving the Elementor page causes the following PHP fatal error:

    PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /www/wp-content/plugins/give/includes/misc-functions.php:2304

    To reproduce, open the Donation Confirmation page for editing with Elementor. Save the Elementor layout. PHP Fatal error occurs.

    Error occurs with or without the shortcode for the [give_receipt]. Error does not occur if the page is not set as the Success page. Only the Success page aka Donation Confirmation page seems to cause fatal error. Failed Donation and Donor Dashboard page work fine with Elementor.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Angela Bowman

    (@askwpgirl)

    Clarification on steps to reproduce:

    1. Latest version of WordPress, GiveWP, and Elementor Free version.
    2. NEW INSTALL of GiveWP (fresh fresh fresh) in which you go through the GiveWP onboarding, and GiveWP automatically installs all of the pages needed for GiveWP.
    3. Edit the Donation Confirmation page in Elementor (aka the Success page). On one site, I got a Fatal Error as indicated above when saving the Elementor layout. On another site, the page never loads properly. And there is a Javascript error, so I never got to save the page (see error below).
    4. To workaround this issue: Create a NEW WordPress page for the Donation confirmation and change the GiveWP Settings for the Success page to use this new page, then you can edit fine in Elementor.

    So the issue appears to only be a problem, strangely, with the Donation Confirmation page that GiveWP auto generates. Here is a Loom video demonstrating this:

    https://www.loom.com/share/60d1926d8e124481831eb48946ae13c1?sid=d4641fb5-5755-496d-941d-0a73ddfaff16

    The Javascript error when the Elementor edit page interface is open on the Donation Confirmation page that Give creates. I should add I’ve tested in Elementor 3.18.3, 3.19, 3.19.1, and 3.19.2.

    TypeError: e.O is not a function
        at https://askwpgirldemo.sitedistrict.com/wp-content/plugins/elementor/assets/js/frontend.min.js:2:40210
        at webpackJsonpCallback (https://askwpgirldemo.sitedistrict.com/wp-content/plugins/elementor/assets/js/styleguide-app-initiator.min.js:3:12265)
        at webpackJsonpCallback (https://askwpgirldemo.sitedistrict.com/wp-content/plugins/elementor/assets/js/webpack.runtime.min.js:2:4680)
        at https://askwpgirldemo.sitedistrict.com/wp-content/plugins/elementor/assets/js/frontend.min.js:2:74


    There is also a PHP warning happening on the site but perhaps unrelated:

    PHP Warning:  Cannot assign an empty string to a string offset in /www/wp-content/plugins/give/includes/misc-functions.php on line 2304
    Plugin Support Matheus Martins

    (@matheusfd)

    Hi, @askwpgirl.

    Glad you reached out.

    We’ve investigated it and we found that you’ve uncovered an edge-case issue with our GiveWP plugin. What is happening is that the receipt shortcode does not load inside the auto-generated success page IF you use Elementor to edit it.

    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/auto-generated-success-page-cannot-be-edited-using-elementor.

    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.

    Meanwhile, the workaround you shared is the best one, to be honest. Create a new page in WordPress for Donation confirmation and update GiveWP settings to use this page, so you can edit it with Elementor.

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

    Thread Starter Angela Bowman

    (@askwpgirl)

    Thanks for that additional input! Yes, and the simpler workaround I realize is this:

    BEFORE editing the page with Elementor, REMOVE the Classic Editor block on that page, so the WordPress edit page is BLANK. Then update the page.

    THEN you can edit with Elementor just fine and manually insert the shortcode using Elementor’s shortcode widget.

    So no need to create a whole new page. That just circumvented the issue you described with rendering that shortcode when it tried to automatically bring it in from the WordPress page content.

    I should add that when I originally encountered the issue, I didn’t have the Javascript issue and things appeared to be fine, but it was only upon saving the Elementor page that I encountered the PHP error, and even if I removed the auto generated block that came over, it still threw the PHP error.

    Now it is limited to a Javascript error, and deleting the content that Elementor brings over from the page fixes it as well. Not sure what shifted, but all is well with the workaround.

    • This reply was modified 9 months, 3 weeks ago by Angela Bowman.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘GiveWP Fatal Error saving Elementor layout on Donation Confirmation page’ is closed to new replies.