Jump to content

Error to add a video in text edit (help)


Recommended Posts

Hello, today im preparing a new shop, i have other in prestashop 1.4.7 and i dont have any problem, in prestashop 1.5.3, when i go to add a video, with html code, direct of youtube, appear a error, withou video, the module funtion is correct.

Check the error please:

 

 

[PrestaShopException]

 

Property EditorialClass->body_paragraph is not valid

at line 825 in file classes/ObjectModel.php

 

819.

820. $message = $this->validateField($field, $value, $id_lang);

821. if ($message !== true)

822. {

823. if ($die)

824. throw new PrestaShopException($message);

825. return $error_return ? $message : false;

826. }

827. }

828. }

829.

[PrestaShop] Fatal error in module head:

Undefined offset: 6

 

 

 

Help me please!

Link to comment
Share on other sites

Well, i installed presashop 1.5 in local, for check if teh problem was of the host, but NO, i think that is a BUG of the version 1.5, in that, you cant add code html with video, like appear in yoube, for example this:

<iframe width="420" height="315" src="http://www.youtube.com/embed/pabLH9v4hNs" frameborder="0" allowfullscreen></iframe>

in the editorial module, that is a pitty, because is a good tool for the shop.

Link to comment
Share on other sites

  • 5 months later...

Hi Ledwis,

 

I have same error with iframe in editorial module (prestashop 1.5.3.1) whan i want to put a youtube video or a iframe video:

body_paragraph is not valid
at line 872 in file classes/ObjectModel.php

 

Did you found a solution about this ? or if someone have an idea ? :(

 

Thanks,

Philippe

Edited by Graphileom (see edit history)
Link to comment
Share on other sites

had the error "video type or invalid file path" when trying to embed the video in a module created page

 

when I added the video to a CMS page (using the Prestashop 'add video' feature), it worked

had to chose the iframe option when adding the video

 

so, I went in and looked at the html, and this is what it looks like for a successful video

 

<p><iframe src="http://www.youtube.com/embed/F4LU2qbhrOE" frameborder="0" width="425" height="350"></iframe></p>

 

when I copied and pasted that into my blog module post, it worked

Link to comment
Share on other sites

Hi SC3,

 

Don't work for me with <p></p>, in editorial module.

 

Message:

[PrestaShopException]
Property EditorialClass->body_paragraph is not valid
at line 872 in file classes/ObjectModel.php
866.
867.	 $message = $this->validateField($field, $value, $id_lang);
868.	 if ($message !== true)
869.	 {
870.	  if ($die)
871.	   throw new PrestaShopException($message);
872.	  return $error_return ? $message : false;
873.	 }
874.    }
875.   }
876.

Link to comment
Share on other sites

Hi, Graphileom,

 

I should have clarified: I did not modify the php file.

 

 

For video on one site page (the 'Videos' page):

I edited the HTML code on the CMS page directly using the built in CMS HTML edit capability.

 

I did that because the built in formatting/editing/inserting video function didn't work for me. I'll probably try it again using the iframe video format choice; I was in a hurry and knew I could force the video onto the page without trying all the insert-video-format choices.

 

 

For video on the site's blog page, I'm using the built in text/format/etc editing that comes in Prestashop. It did work on that page, perhaps because I lucked out and chose the iframe format first.

 

 

You are welcome to look at the code on my blog page using Firefox debugger (or equivalent) to see if that helps w/ your php implementation.

 

Or, you can take a look directly at the free blog module code via this thread:

http://www.prestashop.com/forums/index.php?/topic/139638-module-free-blog-module-a-usefull-prestashop-module/page__view__findpost__p__1287848

 

As far as translating something that works via HTML into something that works via php, sorry - maybe someone else can help with that method.

 

SC3

Link to comment
Share on other sites

×
×
  • Create New...