eZ Community » Forums » Extensions » Sqliimport xmlblock ezembed problem
expandshrink

Sqliimport xmlblock ezembed problem

Sqliimport xmlblock ezembed problem

Monday 03 June 2013 12:14:23 pm - 3 replies

Hi Ezcommunity,

I've a strange problem and I'm sure a developer already had this.

I use Sqliimport to imports different type of data. All works fine except a little point linked to xml blocks and external media.

To import my data, I use an external url to retrieve an xml feed (create by me).

In a custom extension, I import my data in an xml block using this code :

  $content->fields->body     = $this->getRichContent( $row->body );

But when I've an image in my xml block, this image doesn't loaded and I've this code in my xml block :

 ezembed

When I build my xml block, I use this code :

 htmlspecialchars($dataMap["body"]->DataText, ENT_QUOTES);

And I've this return for ezembed media :

 <paragraph><embed size="medium" align="center"  custom:lightbox="false" custom:offset="0" custom:limit="5"  node_id="4489"/></paragraph>

I'm pretty sure it's possible to download and display my embed media file even if it's an xml block ?

This problem is present regardless languages.

I import my data with Administrator user rules and policies.

Any idea ?

Thanks for your answer,

Regards

Monday 03 June 2013 3:24:47 pm

Hi Nicolas

If you have images in your HTML content, you need to pre-process them in order to integrate them properly (i.e. create image content objects)

Monday 03 June 2013 4:55:47 pm

Thanks Jérôme for this reply. 

I thunk to do this but how can I link this image (with ezembed node_id) to new xml block and new node_id ?

Because when I'll create my image, the node_id will be different from the previous.

I'm forced to handle this update in php (via a str_replace for example) to change the old node_id by the new ? or maybe a real great method exists ? 

Regards

Wednesday 05 June 2013 4:55:07 pm

Hi, 

I found a clear solution to my problem with a point not stated in my initial post. 

To resume :

My host provider gave me wrong rules on this server and my shell user can't create images in var folder. 

Well, after a brief modification of these rules and policies, I can create, integrate, update my media as I want. 

This problem is solved for me and I'm sure any developer may find this topic useful. 

 

Regards

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from