The MU forums have moved to WordPress.org

Google checkout "buy it now button" form code won't save (26 posts)

  1. Nimwit
    Member
    Posted 15 years ago #

    I can't seem to save the form code for a Google checkout button in WPMU 2.7.1 Beta.

    No matter if it's visual or html when I save the pasted code from Google Checkout WPMU strips out everything apart from the open and close <form>. Everything else inside the form just disapears...

    Any clues?

  2. Nimwit
    Member
    Posted 14 years ago #

    I works if I put the html in to a text widget but not posts or pages...

    This code:

    <form action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/ID" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm">
    <input name="item_name_1" type="hidden" value="T-Shirt"/>
    <input name="item_description_1" type="hidden" value="T-Shirt"/>
    <input name="item_quantity_1" type="hidden" value="1"/>
    <input name="item_price_1" type="hidden" value="9.0"/>
    <input name="item_currency_1" type="hidden" value="GBP"/>
    <input name="_charset_" type="hidden" value="utf-8"/>
    <input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=ID&w=117&h=48&style=white&variant=text&loc=en_US" type="image"/>
    </form>

    Changes to this:

    <form action="https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/ID" method="post" name="BB_BuyButtonForm">

    </form>

  3. deblaca
    Member
    Posted 14 years ago #

    I've seen something similar where code has disappeared for embedding Google Maps, and have used plugins for embedding things like YouTube videos.

    Any thoughts on how best to get code like this included?

  4. andrea_r
    Moderator
    Posted 14 years ago #

    Allow the tags in kses.php.

  5. Nimwit
    Member
    Posted 14 years ago #

    Thanks andrea, I will try it.

    Do you know of any mu plugins that would make the changes without the need to change core code in mu?

    N.

  6. andrea_r
    Moderator
    Posted 14 years ago #

    Are you on a closed system (not open to the public)?

    http://wordpress.org/extend/plugins/unfiltered-mu/

  7. Nimwit
    Member
    Posted 14 years ago #

    I have a .htaccess user + pass setup as I'm still developing the pages so noone outside can access the site. Would that make a difference?

    Perfect plugin by the way! saves me messing around with the core code!

    Thanks.

    N.

  8. andrea_r
    Moderator
    Posted 14 years ago #

    Nope.

    by closed system, I mean you;re not going to let just anyone signup for a blog. This plugin will let ANY member post ANY code, including drop_database.

  9. Nimwit
    Member
    Posted 14 years ago #

    OK. I will not put in to the mu-plugins and just activate it on main blog home.

    Thanks.

    N.

  10. SharkGirl
    Member
    Posted 14 years ago #

    I'm getting the same problem with MU stripping all my html code out. I've even tried Unfiltered MU by Automattic and it doesn't work.

    I realize there are MANY threads about MU stripping code, but I have yet to find a solution that works. I just upgraded to the new 2.7 update today, but have never found a fix even before I upgraded.

    I've been following Google results all over the Internet looking for a solution. How on earth do I get the code to stay put? I don't care about the security issues. I'm running my own blogs and have no additional users. What I want is to be able to have standard html formatting capabilities. I don't know of anyone who wants all their paragraphs to run together with no line breaks.

    Even in the MU forum I see frustration concerning this issue. Other than scrapping WordPress, is there a solution to getting the formatting back?

    I've also tried using an older version of the kses.php file but it isn't compatible with version 2.7+

  11. gappiah
    Member
    Posted 14 years ago #

    @SharkGirl,

    Sorry to hear your frustrution with WordPress MU stripping out your code. But remember while your installation is in a "trusted" environment hence no protection against arbitrary code execution is necessary, many others use MU to offer hosting service to the public, and in those environments you just cannot let users execute arbitrary code.

    And when it comes to security, it's always a good idea to err on the side of caution.

    Perhaps a solution to this would be for the MU installer to present an option to enable / disable code filtering during installation (along with strong warnings about the implications of each option).

    I can confirm that the above plugin works. Also standard formatting tags, stuff like <p>, <em >, etc. are NOT (if I remember correctly) stripped by kses.php, so it seems something else is happening at your end. Are you pasting text from MS Word?

  12. andrea_r
    Moderator
    Posted 14 years ago #

    ". I don't know of anyone who wants all their paragraphs to run together with no line breaks."

    This is actually a common error with WP users and Safari.

  13. Nimwit
    Member
    Posted 14 years ago #

    That plugin from andrea worked for me. I ONLY installed it on the blogs that needed to use the code from google checkou buttons and did not install it in the mu-plugins folder. So, the security is not an issue as I trust the two blogs that wated the code to work.

    Did you install it as a normal plugin then go in to the blogs you want to us it on and activate it manually via the admin account...?

    N.

  14. SharkGirl
    Member
    Posted 14 years ago #

    andrea_r, how is it in an error with the users?

    I need a new page. I go to the admin center and select new page. I use the visual editor and make paragraphs, add bold headings, put a space between each paragraph, and walla! The page looks great, like it should be..so I publish it.

    I go view the page and all but the bold format has been removed.

    I go back to the page in the admin center and view the page through the HTML portion of the editor, and nothing. Tags are stripped.

    According to all the other threads (and there are many), WP MU strips the code.

    If I'm doing something wrong when I write my pages, I would love to know how to correct it.

    Yes, I installed the Unfiltered MU through admin center. Then I went back to my page and re-added all the <p></p>. All my paragraphs are still running together. MU acts as if it can't see any formatting at all, except for bold.

  15. andrea_r
    Moderator
    Posted 14 years ago #

    I said it was a common error for single WordPress users as well.

    You still didn't mention what browser you were using. this is not MU-specific. It's an issues with TinyMCE, the visual editor, and your browser.

  16. Nimwit
    Member
    Posted 14 years ago #

    <p></p> tags never show up in any of my wordpress installs either once I save the page/post. But the code is there. The TinyMCE plays around with it and hides it from you ;)

  17. SharkGirl
    Member
    Posted 14 years ago #

    Sorry for the misunderstanding andrea. I'm using FireFox with the most current update.

    Nimwit, I'm wondering if TinyMCE is the problem then instead of WordPress.

    I absolutely have to have formatting capabilities. I understand, through all the other threads, why the developers programmed it to strip code, but I can't figure out why any developer out there would determine no one wants to format the page appearance.

    I don't see the WordPress blog itself showing text that runs into each other because there are no paragraph and line breaks. So they must have figured out a way around this. Yet, it's an open issue throughout many threads and on many sites that no one has a cure for.

  18. andrea_r
    Moderator
    Posted 14 years ago #

    ... because it's a browser issue. I'm running Firefox as well. I never have to manually add paragraph breaks or tags. The enter button does it.

  19. SharkGirl
    Member
    Posted 14 years ago #

    andrea, I'll try using IE, I didn't know WordPress didn't work with Firefox.

  20. SharkGirl
    Member
    Posted 14 years ago #

    Nope, that isn't the issue. I made a new page, created sub headers in bold and created three paragraphs. I published the page then viewed it.

    It stripped out the code and smashed all the text together with no paragraph formatting or line breaks.

    Why is this happening? I didn't have this problem until I installed version 2.7.

  21. andrea_r
    Moderator
    Posted 14 years ago #

    "I didn't know WordPress didn't work with Firefox."

    You missed what I said - it *does* work with FF. I'm using FireFox and I don't have this problem.

    "It stripped out the code and smashed all the text together with no paragraph formatting or line breaks."

    In the backend in the text of the post itself, or on the *frontend*?

    Because it quite possibly could be the theme.

  22. SharkGirl
    Member
    Posted 14 years ago #

    Strips code in the front end.

  23. andrea_r
    Moderator
    Posted 14 years ago #

    Got a link?

  24. SharkGirl
    Member
    Posted 14 years ago #

    You're right andrea. It's the theme. I switched to the default theme and it shows all the formatting.

    Do you know what it is about a theme that would strip the codes? If I use Windows Live Writer, the pages stay the way I formatted them. It's only when they are created, edited or opened in the WordPress editor that the code is removed.

    Maybe there's a file in the theme I can edit?

  25. andrea_r
    Moderator
    Posted 14 years ago #

    The theme doesn't strip the code. Phe theme's CSS file has reset the padding & margins around the p tags to 0.

    Put something like this in the theme's style.css:

    p {padding: 15px 0px;}

    you may need to tweak it a bit further but that should definitely make a difference.

  26. SharkGirl
    Member
    Posted 14 years ago #

    Thanks very much!

About this Topic

  • Started 15 years ago by Nimwit
  • Latest reply from SharkGirl