Forums

[resolved] Amazon is breaking comments (15 posts)

  1. sense7
    Member
    Posted 3 years ago #

    I started my blog about a month ago. I've been tinkering around with it, adding google and amazon ads to the sidebar and in posts. However, I noticed yesterday that putting an Amazon link directly in my post breaks the comments system. In fact, I think it breaks everything after the Amazon link, because my site no longer displays "Powered by Wordpress" or my Site Meter at the bottom of the page.

    Example page:

    http://www.8bitninja.com/2006/04/14/8-bit-ninja-feature-tetris-ds/#more-37

    I review games now and again, and I usually post Amazon links to each game I review. Usually, I just paste the Amazon link code right into the post HTML using the HTML editor.

    I think it might have something to do with wordpress converting the Amazon iframe into a self closing tag?

    BTW, I have the WP-Amazon plugin, but the links it generates don't look nearly as nice or professional as the official Amazon links.

    I know there are a zillion posts about Amazon ads but I couldn't find anybody with my specific problem.

    Any help would be greatly appreciated.

  2. Otto42
    Moderator
    Posted 3 years ago #

    Your page doesn't validate. Several errors complaining about bad ending tags and such.

    Load your page up in the validator and fix your page's code one error at a time, revalidating after each one. This will probably fix your issue.

    http://validator.w3.org

  3. sense7
    Member
    Posted 3 years ago #

    Well, half of the errors on my page are IN the Amazon links themselves. I don't build these links, they are generated by Amazon.

    Granted, I have a few open tags here and there--although I've checked some of them and they appear to be right---but I don't think that's what's causing my problem.

    I am not a coder, and I have only made slight modifications to my template files. A lot of the invalid code was there before I did anything.

  4. davidchait
    Member
    Posted 3 years ago #

    As the programmer behind CG-Amazon, I can't say I've ever had problems with links I generate causing issues. But then I'm not generating IFRAMEs...

    Looks to me like there are a TON of problems with your body HTML. I'd try a few possible things:

    = take a post without an amazon link. fix your theme and code until it passes the validator.
    = take a post WITH an amazon link. Look to see if it introduces problems. If it does, look at other ways of adding it (i.e., don't use wysiwyg editor, or try something like CG-Amazon, etc.).

    an unclosed tag is most certainly the problem. if you look at the source of that page, the rest of the content IS there, the browser just isn't rendering it due to html errors most likely.

    -d

  5. ladydelaluna
    Member
    Posted 3 years ago #

    Amazon links (as well as PayPal links) don't work well when they're added using the rich-text editor and the HTML popup... try grabbing a plugin for it, as mentioned above, and see what happens.

    And yes, fix those errors - it's suprising how much gets affected by them! :)

  6. Otto42
    Moderator
    Posted 3 years ago #

    sense3 said: "Well, half of the errors on my page are IN the Amazon links themselves. I don't build these links, they are generated by Amazon."

    Sorry, but no. The Validator isn't looking at the contents of the iframe, it's looking at your XHTML only.

    The main problem seems to be all those freakin' weird span class="postbody" tags that you have for some unknown reason. The last three of them are not closed and that seems to be a large part of the problem.

    Validation isn't just a fun little optional thing. If the markup ain't valid, anything can happen. Fixing the template or code to make it validate correctly fixes most layout issues, generally. And the browsers I've tried (IE and FF) are definitely choking on your XHTML, not the iframe's.

  7. sense7
    Member
    Posted 3 years ago #

    I'll give it a try. Thanks.

  8. sense7
    Member
    Posted 3 years ago #

    Okay, I've removed all the weird span tags. This page was copied from one of my old sites pages. I think the copy/paste procedure added the span tags for some reason. The example entry is now valid, but comments are still broken:

    http://www.8bitninja.com/2006/04/14/8-bit-ninja-feature-tetris-ds/

    I'll continue to grab the rest of the errors I suppose. I may just switch to CG-Amazon. I have a question though, can it be used to place Amazon items in the sidebar, or just inline with posts?

  9. ladydelaluna
    Member
    Posted 3 years ago #

    you shouldn't run into any major issues using the code "as is" when you put it in the sidebar... for some reason, it's just in posts/pages.

  10. sense7
    Member
    Posted 3 years ago #

    I've just now realized that the majority of errors on my page are from the same line of code. It's my Amazon vertical banner on the main page. Maybe I haven't embedded it right. I'm working on it now.

  11. sense7
    Member
    Posted 3 years ago #

    Okay, fixed the Amazon banner, unencoded ampersands.

    I still have four error, but I can't find them in the template files, which makes me think they are in the actual index.php file.

    Still, my problem page is Valid now, but the Amazon breaks the comments for some reason. I guess I should just stop messing with it and grab CG-Amazon. Anybody have any other ideas?

    Here's the URI again:

    http://www.8bitninja.com/2006/04/14/8-bit-ninja-feature-tetris-ds/

  12. ladydelaluna
    Member
    Posted 3 years ago #

    there's no way to do it without a plugin...

    "Amazon links (as well as PayPal links) don't work well when they're added using the rich-text editor and the HTML popup... try grabbing a plugin for it, as mentioned above, and see what happens."

  13. sense7
    Member
    Posted 3 years ago #

    Well, alright then. Thanks for the help. I was actually wanting to get my page valid anyway. I thought it would be a lot harder.

    Thanks.

  14. davidchait
    Member
    Posted 3 years ago #

    Glad you got things validating/cleaned up. That's always a good place to start with odd stuff. ;)

    Looking at the page source, the </p> that should close the paragraph around the iframe block isn't showing up styled, so firefox obviously thinks something is still 'open'. But I don't see it with the naked eye...

    Yes, CG-Amazon (in combination with CG-Inline) is great for inlines (graphical floats/wraps or inlined-text), sidebar lists (currently reading, et al), and has the ability to show your custom database entries locally (almost like a mini-storefront, but not quite).

    The next version of CG-Amazon will have a WP2.x hook for the products database to be automatically built with nice URLs, and a customizable theme Page template too. I'm also looking at customized output replacement templates (or at least a pick-and-choose system) -- but that'll be mixed in with my revisions to CG-FeedRead at some level (as both are based off my XML processing backend...).

    -d

  15. Otto42
    Moderator
    Posted 3 years ago #

    Dumb idea, maybe, but try changing the iframe ending from the normal .../> to an actual (/iframe) ending. No, it makes no sense, but then it doesn't have to if it works. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags