ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Error in Safari error console for rss feed

October 08, 2010 3:47pm

Subscribe [2]
  • #1 / Oct 08, 2010 3:47pm

    fourlincoln10

    18 posts

    I setup an rss feed for one of my weblogs. I copied and pasted the feed template because I don’t know anything about rss. When I view the page in Safari with the error console on, I get the following error:

    <head> must be a child of <html>. Content ignored.

    The page validates using the w3 validator http://validator.w3.org/feed/, and it seems to display okay but sometimes I get a blank screen and I have to reload the page. I’m not sure what’s going on. Here is a link to the page:

    http://posustainableseafood.com/index.php/rss

    Here’s my template:

    {preload_replace:master_channel_name="news"}
    {exp:rss:feed channel="{master_channel_name}"}
    
    <?xml version="1.0" encoding="{encoding}"?>
    <rss version="2.0"
        xmlns:dc="http://purl.org/dc/elements/1.1/"
        xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
        xmlns:admin="http://webns.net/mvcb/"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
        xmlns:content="http://purl.org/rss/1.0/modules/content/"
        xmlns:atom="http://www.w3.org/2005/Atom">
    
        <channel>
        <title><![CDATA[{channel_name}]]></title>
        <link>{channel_url}</link>
        <description>{channel_description}</description>
        <dc:language>{channel_language}</dc:language>
        <dc:creator>{email}</dc:creator>
        <dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
        <dc:date>{gmt_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
        <admin:generatorAgent rdf:resource="http://expressionengine.com/" >
        <atom:link href="http://posustainableseafood.com/index.php/rss" rel="self" type="application/rss+xml" >
        
    {exp:channel:entries channel="{master_channel_name}" limit="10" dynamic_start="on" disable="member_data|pagination"}
        <item>
          <title><![CDATA[{title}]]></title>
          <link>{title_permalink='site/index'}</link>
          <guid>{title_permalink='site/index'}#When:{gmt_entry_date format="%H:%i:%sZ"}</guid>
          <description><![CDATA[{summary}{body}]]></description>
          <dc:subject><![CDATA[{categories backspace="1"}{category_name}, {/categories}]]></dc:subject>
          <dc:date>{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
        </item>
    {/exp:channel:entries}
        
     </channel>
    </rss>
    
    {/exp:rss:feed}

    Thanks for your help,

    Troy

  • #2 / Oct 09, 2010 2:17pm

    Greg Salt

    3988 posts

    Hi Troy,

    I can’t see any error with the two articles in September. Has this happened with these two or were they earlier ones? Have you noticed this error with other browsers?

    Cheers

    Greg

  • #3 / Oct 09, 2010 6:09pm

    fourlincoln10

    18 posts

    I get the error when viewing the September articles. I just opened the page again with the error console open in Safari. An error flashed that said something about the frame not loading..it flashed by too fast and was replaced with the error

    <head> must be a child of <html>. Content ignored.

    It indicates the <head> error is on line 6. Would that be the line

    xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#”?

    Thanks,

    Troy

  • #4 / Oct 10, 2010 3:16pm

    Greg Salt

    3988 posts

    Hi Troy,

    I believe that what you’re referring to is an (intermittent) error within Safari’s feed parser and not a problem with your site RSS. Safari will still display the feed correctly (at least mine does - Version 5.0.2 6533.18.5).

    Cheers

    Greg

  • #5 / Oct 10, 2010 4:31pm

    fourlincoln10

    18 posts

    Sounds good to me. It always seems to render correctly…I just see the error when the error console is turned on.

    Thanks,

    Troy

  • #6 / Oct 10, 2010 4:32pm

    Greg Salt

    3988 posts

    Hi Troy,

    Okay, I’ll go ahead and close this thread. Please post back if you have further questions or problems.

    Cheers

    Greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases