• Resolved rik100

    (@rik100)


    When I add a payment form shortcode to a page it causes my page header to repeat twice. The form itself fails to load. If I view the form on its own page i.e. not by adding a shortcode but by simply viewing the form, it displays correctly.

    This happens only with multi-step forms and classic forms, not with legacy forms.

    It happens only with give-wp shortcodes.

    Any help appreciated.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Rick Alday

    (@mrdaro)

    Hi @rik100,

    Happy to help.

    It looks like the form iframe is trying to load itself:
    https://rotaryestoipalace.org/bew/?giveDonationFormInIframe=1

    I also noticed that the form iframe URL is incorrect. It should have this format:
    https://rotaryestoipalace.org/bew/give/%5Bform title here]?giveDonationFormInIframe=1

    Go to Donations -> Settings -> Advanced and look at the value for “Form Page URL Prefix”. Make sure it’s “give” (without quotes) or any other slug that does not conflict with the slug from an existing page, post, or archive.

    Next, refresh your permalinks by going to Settings -> Permalinks and clicking the “save changes” button.

    If you have any redirection rules, temporarily deactivate them to see if that’s what’s causing the problem.

    If all fails, you can always use the Legacy form template.

    Thread Starter rik100

    (@rik100)

    Hi Rick
    Thanks for the reply. I have checked the permalinks settings, the form page url prefix and redirections and all looks good.

    I note your comments about the Iframe URL being wrong but I presume this is generated by the form’s shortcode as the shortcode is the only thing I put on the page. So it seems to me that the shortcode itself is generating an incorrect iframe url.

    I realise I can use the Legacy form template but that’s not what I want to do as Classic form template works much better for me and I have used it successfully in a previous iteration of the giveWP plugin.

    Any other ideas?

    Plugin Support Rick Alday

    (@mrdaro)

    Hi @rik100,

    I checked your site and the form loads here: https://rotaryestoipalace.org/payments/test2/

    It’s generating the correct iframe URL there:
    https://rotaryestoipalace.org/give/test2?giveDonationFormInIframe=1

    The source code of your homepage: https://rotaryestoipalace.org/bew/

    Has this code:

    <div class="entry-content">
    	<iframe src=[give_form id="18688"]</iframe> 
    </div>

    But you don’t need to wrap the form shortcode in iframe tags. You only need to use this:
    [give_form id="18688"]

    Thread Starter rik100

    (@rik100)

    Hi Rick

    It’s not me adding iframe tags and yes the form loads properly using its dedicated URL. But I want to put the form on a page so that I can add other content. I am using Gutenberg and inserting the shortcode exactly as you suggest using the shortcode block. There is nothing else on the editing page except the shortcode. I have also tried adding it as custom HTML but it still creates the error.

    You can see a screenshot of the editing page at https://rotaryestoipalace.org/screenshot-2/ .

    As I said before this only happens with the multi-step and classic templates, not the legacy template. And it only happens with GiveWP shortcodes.

    By way of a comparative test I have set up a legacy form using the exact same process on another page at https://rotaryestoipalace.org/bew2/ and it works just fine so I could use that as a workaround but I really want to use the classic template.

    Is there something else I might be missing?

    Plugin Support Rick Alday

    (@mrdaro)

    The next step would be to try our Health Check tutorial. This can allow you to test your site with different plugins without hurting the front-end of your site at all. https://givewp.com/documentation/resources/troubleshoot-wordpress-websites-health-check/

    Let me know if you find a conflict with another plugin or the theme.

    Plugin Support Rick Alday

    (@mrdaro)

    Hi there,

    Just checking in on this issue. Do you still need assistance here?

    If you still need help, reply and we’ll make sure everything is handled.

    Thread Starter rik100

    (@rik100)

    Hi Rick

    Yes, I’m still here ??

    I have deactivated and reactivated all plugins although I didn’t use the health check plugin.I also set the theme to default and also disabled all custom php code. Same problem. I also tried deactivating Gutenberg and using the classic editor.

    It seems to me that the shortcode itself is generating the unnecessary iframe code. I don’t really understand how shortcodes work but I wondered if it’s possible to somehow view the html code created by the shortcode. It’s odd that the problem doesn’t occur with shortcode for the legacy form.

    Could it be a database issue? I recently had to fully delete the GiveWP plugin and all its data to resolve an issue with the Stripe Gateway (this was on a ticket as I pay for the stripe plugin). I have had to rebuild all my donation forms which is when this issue presented itself. Could there be something left over form that?

    Cheers.

    Thread Starter rik100

    (@rik100)

    I see this has been marked as Resolved but it’s not. I haven’t received any response to my previous reply.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Cannot add shortcode to a page’ is closed to new replies.