You are here:  » Feeds: Line Breaks in Fields Cause the Record to End : Please Help

Support Forum



Feeds: Line Breaks in Fields Cause the Record to End : Please Help

Submitted by rsteiner125 on Fri, 2006-12-01 17:02 in

Hello, I have some feeds that have line breaks in the middle of the description field which causes that record to end when being imported. In Note Pad the line breaks show up as two squares.

Example:
"http://www.3rliving.com/ProductDetails.asp?ProductCode=0-7565-0307-6&click=7","Waste Not: Time to Recycle","A great way to teach your children about the importance of recycling. Photos and diagrams make the book clear for little environmentalists.

24 Illustrated Pages

By Rebecca Weber","http://www.3rliving.com/photos/0-7565-0307-6-2.jpg","Kids","14.95","0-7565-0307-6"

The Point:
The importer ends the record right after "for little environmentalists." and does not continue to record the rest of the fields for that record. Is there any way to make the importer stop doing this and parse the entire record?

Any help greatly appreciated! Thanks!

Submitted by support on Fri, 2006-12-01 17:16

Hi,

The first thing to check is that you are using a "Quoted Text" format. This is sometimes not automatically detected because a header row may not be quoted whereas records are; so if this is the case the line breaks will force the end of record.

When you register this feed, do real field names show up in the sample record; or do you see FIELD1, FIELD2 etc.?

Based on the data that you have posted, if you see real feed names make sure that you are selecting the following format (on feed registration step 1)

"Quoted Text - Header Row - Comma Separated"

However, if you are seeing FIELD, FIELD2 etc, select:

"Quoted Text - No Header Row - Comma Separated".

Magic Parser should then be able to handle the line breaks correctly. However, if you still find that it is not working, could you send me an email with the URL to the feed on your server, for example:

www.yoursite.com/feeds/merchant.txt

...and I will download it and check it out on my test server. Reply to your registration code or forum reg email is the easiest way...

Hope this helps,
Cheers,
David.

Submitted by rsteiner125 on Fri, 2006-12-01 17:31

I have tried that setting you suggested. I figured it would work but have had no luck. And yes, the field names are showing up correctly. Check it out: [snipped]

Thanks for your speedy reply! It's a a rainy day over here in Vermont and I have nothing else to do but sit by the computer.

-R.J.

Submitted by support on Fri, 2006-12-01 17:33

Thanks - i've got the URL - i'll check it out and get back to you.

Cheers,
David.

Submitted by support on Fri, 2006-12-01 17:58

Hi Again,

Problem solved. CSV feeds with records containing line breaks are rare and I haven't really had enough test cases. In this instance, the double line-feed sequence which this feed contains was causing the end of record to trigger in error.

I have now fixed this in the version of MagicParser.php contained in the Price Tapestry distribution. If you download the script again, you can either extract all files again or simply upload the updated includes/MagicParser.php to your existing installation.

Your feed auto-detects correctly and should now work fine - apologies for the inconvenience...

Cheers,
David.

Submitted by rsteiner125 on Fri, 2006-12-01 18:21

YOU ROCK! and your code is bangin.