1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Security error occurred. Please press back, refresh the page, and try again.

Discussion in 'Troubleshooting and Problems' started by mrchasez, Jun 22, 2012.

  1. mrchasez

    mrchasez Active Member

    We use a (paid) plugin called HTML BBCODE.
    It allows us to have html in threads.

    So on our donate page, we have a "buy it now" button (it lets you choose what rank you want and put in your minecraft username)

    Whenever someone picks there rank, puts in there name and pushes "buy it now"
    (Donate page) http://kingscrafters.com/index.php?inline-mod/post/switch

    It leads to a page that says
    "Security error occurred. Please press back, refresh the page, and try again."
    Link to page; http://kingscrafters.com/index.php?inline-mod/post/switch

    Whats weird is, We have another buy it now button right below it, Only difference is it has different options, and it works.

    Please help ;(
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is because the posts themselves are already within an HTML form (the inline moderation form). HTML forms cannot be nested. That's why your Paypal form is submitting the moderation action.

    You have to use a hyperlink instead of a form. Here is BB code for a hyperlinked donation image. Put this in your post:


    [URL=https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=yourpaypalemail@you.com&lc=US&item_name=donate%20to%20mysite&no_note=0&currency_code=USD][IMG]https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif[/IMG][/URL]


    You just need to enter your email into the URL (yourpaypalemail@you.com).

    The result:

    [​IMG]
     
  3. mrchasez

    mrchasez Active Member

    Thats not possible.
    There are customization requests that need to be made.
    Heres an image:
    http://awesomescreenshot.com/0768oowef
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Does your form submit to paypal? You can put any form fields into the URL as GET parameters.
     
  5. mrchasez

    mrchasez Active Member

    Code:
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="DGNHYMLSHJ2YJ">
    <table>
    <tr><td><input type="hidden" name="on0" value="Upgrades">Upgrades</td></tr><tr><td><select name="os0">
    <option value="VIP-&gt;Builder">VIP-&gt;Builder$5.00 USD</option>
    <option value="Builder-&gt;Baron">Builder-&gt;Baron$6.00 USD</option>
    <option value="Baron-&gt;Knight">Baron-&gt;Knight$7.00 USD</option>
    <option value="Knight-&gt;Hero">Knight-&gt;Hero$10.00 USD</option>
    <option value="Hero-&gt;Supreme">Hero-&gt;Supreme$21.00 USD</option>
    <option value="Supreme-&gt;Paladin">Supreme-&gt;Paladin$30.00 USD</option>
    <option value="Paladin-&gt;Legend">Paladin-&gt;Legend$31.00 USD</option>
    <option value="Legend-&gt;Emperor">Legend-&gt;Emperor$50.00 USD</option>
    <option value="Emperor-&gt;Majesty">Emperor-&gt;Majesty$55.00 USD</option>
    <option value="Majesty-&gt;King">Majesty-&gt;King$100.00 USD</option>
    </select> </td></tr>
    <tr><td><input type="hidden" name="on1" value="Minecraft Username:">Minecraft Username:</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
    </table>
    <input type="hidden" name="currency_code" value="USD">
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can put those fields into the URL by using standard GET parameters:

    &hosted_button_id=DGNHYMLSHJ2YJ&on0=Upgrades&os0=Knight-&gt;Hero&on1=Minecraft%20Username:

    etc...

    Alternatively an iframe would work. Instead of putting the form HTML or link code directly into the post, you insert the HTML for an iframe that contains the form. I assume Paypal gives iframe code.
     
  7. mrchasez

    mrchasez Active Member

    Nope, just the code i posted ;'(

    However, Why does the exact same type of thing right below it work fine?
    The only difference is that it has different options
     
  8. mrchasez

    mrchasez Active Member

    I made an iframe.. Its not working it shows up fine

    <iframe src="http://kingscrafters.com/motion/donate/" name="paypal" scrolling="no" frameborder="no" align="left" height = "100%" width = "100%">
    </iframe>

    However, When i click buy now, Nothing happens..

    It works on the real page, but not the iframe WTH!!

    EDIT:
    Now with the iframe, The second one dont work ;G
     
  9. mrchasez

    mrchasez Active Member

    Uhm.. Sometimes the second one work, and sometimes it don't
    I have even see teh first one work (not using iframe)
    Whats going on?
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    When using a HTML form? Inconsistent behavior is because the forms are nested. For that reason you should not use HTML forms inside of posts.
     
  11. mrchasez

    mrchasez Active Member

    So how do i fix this, iframe isn't working
     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Use an iframe or regular hyperlink. Either one should work.
     
  13. mrchasez

    mrchasez Active Member

  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  15. mrchasez

    mrchasez Active Member

  16. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The target goes into the form tag:

    http://www.w3schools.com/tags/att_form_target.asp

    Here is the source code of your form with the target added in red:

    Code:
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="DGNHYMLSHJ2YJ">
    <table>
    <tr><td><input type="hidden" name="on0" value="Upgrades">Upgrades</td></tr><tr><td><select name="os0">
    <option value="VIP-&gt;Builder">VIP-&gt;Builder$5.00 USD</option>
    <option value="Builder-&gt;Baron">Builder-&gt;Baron$6.00 USD</option>
    <option value="Baron-&gt;Knight">Baron-&gt;Knight$7.00 USD</option>
    <option value="Knight-&gt;Hero">Knight-&gt;Hero$10.00 USD</option>
    <option value="Hero-&gt;Supreme">Hero-&gt;Supreme$21.00 USD</option>
    <option value="Supreme-&gt;Paladin">Supreme-&gt;Paladin$30.00 USD</option>
    <option value="Paladin-&gt;Legend">Paladin-&gt;Legend$31.00 USD</option>
    <option value="Legend-&gt;Emperor">Legend-&gt;Emperor$50.00 USD</option>
    <option value="Emperor-&gt;Majesty">Emperor-&gt;Majesty$55.00 USD</option>
    <option value="Majesty-&gt;King">Majesty-&gt;King$100.00 USD</option>
    </select> </td></tr>
    <tr><td><input type="hidden" name="on1" value="Minecraft Username:">Minecraft Username:</td></tr><tr><td><input type="text" name="os1" maxlength="200"></td></tr>
    </table>
    <input type="hidden" name="currency_code" value="USD">
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>
    
     
  17. mrchasez

    mrchasez Active Member

    So i upload this to another page, then iframe it?
     
  18. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes.
     
  19. mrchasez

    mrchasez Active Member

    Still not working for me

    <iframe src="http://kingscrafters.com/motion/donate/" name="paypal" scrolling="no" frameborder="no" align="left" height = "200px" width = "200px">
    </iframe>
     
  20. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    There is still no target specified in the form.
     

Share This Page