Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index.builder Generating partial feed (xml is truncated) #10

Open
ylansegal opened this issue Nov 10, 2011 · 1 comment
Open

index.builder Generating partial feed (xml is truncated) #10

ylansegal opened this issue Nov 10, 2011 · 1 comment

Comments

@ylansegal
Copy link

I have been trying to figure this out for a while. Using the build in index.builder for the atom feed generated an xml file that is truncated and thus not valid xml.

For example: (Only showing 1 entry for brevity):



<?xml version="1.0" encoding="UTF-8"?>
<xml xmlns="http://www.w3.org/2005/Atom">
  <title>Laptop Battery Depot Blog</title>
  <id>http://www.laptopbatterydepot.com/blog</id>
  <updated>2010-10-19</updated>
  <author>
    <name>Laptop Battery Depot</name>
  </author>
  <entry>
    <title>HP Exiting PC Business</title>
    <link rel="alternate" href="http://www.laptopbatterydepot.com/blog/blog/2011/08/25/hp-exiting-pc-business/"/>
    <id>http://www.laptopbatterydepot.com/blog/blog/2011/08/25/hp-exiting-pc-business/</id>
    <published>2011-08-25</published>
    <updated>2011-08-25</updated>
    <summary type="html">&lt;p&gt;There&amp;rsquo;s big news in the PC market. Hewlett Packard, the world&amp;rsquo;s largest PC maker, has announced plans to spin off its PC business and end it recently acquired TouchPad tablet and smartphone business and instead focus on software and services&amp;hellip;&lt;/p&gt;
</summary>
    <content type="html">&lt;p&gt;There&amp;rsquo;s big news in the PC market. Hewlett Packard, the world&amp;rsquo;s largest PC maker, has announced plans to spin off its PC business and end it recently acquired TouchPad tablet and smartphone business and instead focus on software and services.&lt;/p&gt;

&lt;p&gt;&lt;img style="float: right; border: 5px #ffffff solid;" src="/assets/lbd/blog/ZZ0F97B074.jpg" alt="ZZ0F97B074.jpg" width="135" height="85" /&gt;According to a report in Bloomberg, HP has been “aiming to lessen its dependence on lower-margin PCs, where growth has stalled as consumers flock to tablet-style computers like those made by Apple.”&lt;/p&gt;

&lt;p&gt;Apple was the only maker in the top 5 PC vendors of Western Europe to experience growth in computer shipments. Apple also just surpassed HP in mobile PC sales, mostly due to the highly successful iPad. HP had its own iPad alternative, but consumers didn&amp;rsquo;t find it as attractive as HP hoped. Retailers had indicated that sales of the TouchPad were flat. With the news and major drop in prices, however, they are at least moving off the shelves now with the news.&lt;/p&gt;

&lt;p&gt;If you have an &lt;a href="http://www.laptopbatterydepot.com/lbd/products/HP"&gt;HP laptop&lt;/a&gt; or TouchPad, the company is indicating that current customers won&amp;rsquo;t be abandoned or forgotten. At the same time, some HP owners are going ahead and stocking up on an extra battery or other HP products to ensure availability.&lt;/p&gt;

&lt;p&gt;At &lt;a title="Laptop Battery Depot" href="http://www.laptopbatterydepot.com/"&gt;Laptop Battery Depot&lt;/a&gt;, we have a wide array of laptop batteries for your HP, Apple or any other major brand you may have so that you can purchase a replacement battery or backup battery for when there is a need.&lt;/p&gt;

&lt;p&gt;Currently, we are offering $15 off any battery and free priority shipping. Take advantage of our offer while it lasts!&lt;/p&gt;
</content>
  </entry>

After lots of trial and error, I can say that the problem seems to be the article.summary and article.content. If commenting out both on the builder template, I get a valid (although less useful) atom feed:



<?xml version="1.0" encoding="UTF-8"?>
<xml xmlns="http://www.w3.org/2005/Atom">
  <title>Laptop Battery Depot Blog</title>
  <id>http://www.laptopbatterydepot.com/blog</id>
  <updated>2010-10-19</updated>
  <author>
    <name>Laptop Battery Depot</name>
  </author>
  <entry>
    <title>HP Exiting PC Business</title>
    <link rel="alternate" href="http://www.laptopbatterydepot.com/blog/blog/2011/08/25/hp-exiting-pc-business/"/>
    <id>http://www.laptopbatterydepot.com/blog/blog/2011/08/25/hp-exiting-pc-business/</id>
    <published>2011-08-25</published>
    <updated>2011-08-25</updated>
  </entry>
</xml>

I can't figure out why builder seems to be truncating the feed, and I see no problems on the output to help me out. I have tried adding the article.summary and/or content as CDATA, but doesn't make a difference.

I appreciate any pointers in the right direction so I can get a full feed going.

@ghost
Copy link

ghost commented Dec 12, 2011

This was driving me crazy. Turns out it's caused by an erroneous calculation of Content-Length when the feed contains multibyte characters such as “”. This simple patch fixed it for me.

@amasad
Copy link

amasad commented Mar 10, 2014

I'm running into this, have you figured it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants