Mailing List Archive

SOAP Create and Entities
I recently tried to import a bunch of stories into Bric 2.0, and for this I'm using bric_soap story create.  As with a lot of html stories, the main content area is just a bunch of ugly html. I'm importing this into a wysiwyg custom field - i.e., not in a container, but at the top level of the story type.

When I import the material, the html is getting pretty badly mauled by the soap import process. The content gets wrapped in curly brackets and any kind of tag gets stripped and sometimes replaced with a comma between two quotes.  

I had tested this out on a development install, and didn't run into this issue - everything imported fine. However in the test, I was importing it into a container element.  Perhaps that makes a difference?  

I figure there must be something obvious I'm missing here.  Any help is very much appreciated. 

-Matt
Re: SOAP Create and Entities [ In reply to ]
Hey Matt,

Is your HTML content wrapped in a CDATA tag? In the past, when importing legacy content, I've always wrapped the content of each XML element that could have crazy stuff in it, inside one of these: <![CDATA[" ... "]]> (See http://en.wikipedia.org/wiki/CDATA )

So, <element type="wysiwyg"> <![CDATA[" ... "]]></element>

Might not be the issue you're experiencing, but has worked for me in the past.

Phillip.

P.S. Maybe post an example XML file online for us to see, if the above doesn't solve the issue.

On 2010-08-05, at 9:26 AM, mattrolf wrote:

> I recently tried to import a bunch of stories into Bric 2.0, and for this I'm using bric_soap story create. As with a lot of html stories, the main content area is just a bunch of ugly html. I'm importing this into a wysiwyg custom field - i.e., not in a container, but at the top level of the story type.
>
> When I import the material, the html is getting pretty badly mauled by the soap import process. The content gets wrapped in curly brackets and any kind of tag gets stripped and sometimes replaced with a comma between two quotes.
>
> I had tested this out on a development install, and didn't run into this issue - everything imported fine. However in the test, I was importing it into a container element. Perhaps that makes a difference?
>
> I figure there must be something obvious I'm missing here. Any help is very much appreciated.
>
> -Matt

--
Phillip Smith // Simplifier of Technology // COMMUNITY BANDWIDTH
www.communitybandwidth.ca // www.phillipadsmith.com
Re: SOAP Create and Entities [ In reply to ]
Hi Phillip,

I have not done that.  I will try it and see how it works out.  

Thanks!

-Matt

On 05 Aug, 2010,at 10:06 AM, Phillip Smith <phillip@communitybandwidth.ca> wrote:


Hey Matt,

Is your HTML content wrapped in a CDATA tag? In the past, when importing legacy content, I've always wrapped the content of each XML element that could have crazy stuff in it, inside one of these: <![CDATA[" ... "]]> (See http://en.wikipedia.org/wiki/CDATA )

So, <element type="wysiwyg"> <![CDATA[" ... "]]></element>

Might not be the issue you're experiencing, but has worked for me in the past.

Phillip.

P.S. Maybe post an example XML file online for us to see, if the above doesn't solve the issue.

On 2010-08-05, at 9:26 AM, mattrolf wrote:

> I recently tried to import a bunch of stories into Bric 2.0, and for this I'm using bric_soap story create. As with a lot of html stories, the main content area is just a bunch of ugly html. I'm importing this into a wysiwyg custom field - i.e., not in a container, but at the top level of the story type.
>
> When I import the material, the html is getting pretty badly mauled by the soap import process. The content gets wrapped in curly brackets and any kind of tag gets stripped and sometimes replaced with a comma between two quotes.
>
> I had tested this out on a development install, and didn't run into this issue - everything imported fine. However in the test, I was importing it into a container element. Perhaps that makes a difference?
>
> I figure there must be something obvious I'm missing here Any help is very much appreciated.
>
> -Matt

--
Phillip Smith // Simplifier of Technology // COMMUNITY BANDWIDTH
www.communitybandwidth.ca // www.phillipadsmith.com
Re: SOAP Create and Entities [ In reply to ]
Hi,
let me jump in here. :) I am working on story import vi bric_soap.
Creating a story is fine, but the story can't be found by
bricolage. Trying to export story says

Bric::SOAP::Story::export : story_id "2047" not found.

even though it was created with no complaints just before.
Story has related media, and media files are there in the Media desk.

I've checked the database too, and story is there.
It's still an old 1.10.4 Bricolage.

Any hints are greatly wellcome.

Regards, Zdravko
Re: SOAP Create and Entities [ In reply to ]
Sounds like something failed and a transaction was rolled back.

I Suggest upgrading.

Best,

David

On Aug 5, 2010, at 11:36 PM, Zdravko Balorda wrote:

>
> Hi,
> let me jump in here. :) I am working on story import vi bric_soap.
> Creating a story is fine, but the story can't be found by
> bricolage. Trying to export story says
>
> Bric::SOAP::Story::export : story_id "2047" not found.
>
> even though it was created with no complaints just before.
> Story has related media, and media files are there in the Media desk.
>
> I've checked the database too, and story is there.
> It's still an old 1.10.4 Bricolage.
>
> Any hints are greatly wellcome.
>
> Regards, Zdravko
Re: SOAP Create and Entities [ In reply to ]
Hi Phillip,

Yes, it did work. I did something the first time that somehow caused the first "<![.CDATA[." tag to persist into the content. I have no idea how that worked. But the second time it went through like a charm. Many thanks!

-Matt

On Aug 5, 2010, at 11:04 AM, mattrolf wrote:

> Hi Phillip,
>
> I have not done that. I will try it and see how it works out.
>
> Thanks!
>
> -Matt
>
> On 05 Aug, 2010,at 10:06 AM, Phillip Smith <phillip@communitybandwidth.ca> wrote:
>
>>
>> Hey Matt,
>>
>> Is your HTML content wrapped in a CDATA tag? In the past, when importing legacy content, I've always wrapped the content of each XML element that could have crazy stuff in it, inside one of these: <![CDATA[" ... "]]> (See http://en.wikipedia.org/wiki/CDATA )
>>
>> So, <element type="wysiwyg"> <![CDATA[" ... "]]></element>
>>
>> Might not be the issue you're experiencing, but has worked for me in the past.
>>
>> Phillip.
>>
>> P.S. Maybe post an example XML file online for us to see, if the above doesn't solve the issue.
>>
>> On 2010-08-05, at 9:26 AM, mattrolf wrote:
>>
>> > I recently tried to import a bunch of stories into Bric 2.0, and for this I'm using bric_soap story create. As with a lot of html stories, the main content area is just a bunch of ugly html. I'm importing this into a wysiwyg custom field - i.e., not in a container, but at the top level of the story type.
>> >
>> > When I import the material, the html is getting pretty badly mauled by the soap import process. The content gets wrapped in curly brackets and any kind of tag gets stripped and sometimes replaced with a comma between two quotes.
>> >
>> > I had tested this out on a development install, and didn't run into this issue - everything imported fine. However in the test, I was importing it into a container element. Perhaps that makes a difference?
>> >
>> > I figure there must be something obvious I'm missing here. Any help is very much appreciated.
>> >
>> > -Matt
>>
>> --
>> Phillip Smith // Simplifier of Technology // COMMUNITY BANDWIDTH
>> www.communitybandwidth.ca // www.phillipadsmith.com
>>
>>
>>
>>
>>
>>
>>
Re: SOAP Create and Entities [ In reply to ]
Matthew Rolf wrote:
> Hi Phillip,
>
> Yes, it did work. I did something the first time that somehow caused the first "<![CDATA[" tag to persist into the content. I have no idea how that worked. But the second time it went through like a charm. Many thanks!
>
> -Matt

Hi, Matt,

it worked for me too! :) Once html was wrapped in CDATA stories get imported as
expected.
I do plan to upgrade this week, anyway.

Strangely though, becase export does html encode and it importing exported things is
ok.

Regards, Zdravko