Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25108

As an editor, I want to able to embed images in the RichText editor

    Details

      Description

        Issue Links

          Activity

          Show
          Damien Pobel (Inactive) added a comment - PR: https://github.com/ezsystems/PlatformUIBundle/pull/436
          Show
          Damien Pobel (Inactive) added a comment - Merged in master: https://github.com/ezsystems/PlatformUIBundle/commit/5afceb43a129e9d314be65ebd1628190fa01b66c
          Hide
          Rui Silva (Inactive) added a comment - - edited

          [~damien.pobel@ez.no], I'm not being able to save / publish contents with a richtext fieldtype.
          I just installed a fresh master, and did a composer update right after.
          My environment:

          Debian 7
          PHP 5.4.45-0+deb7u2
          mysql  Ver 14.14 Distrib 5.5.46
          

          What I see on Firefox console:

          Response:
          ErrorMessage:Object
          _media-type:"application/vnd.ez.api.ErrorMessage+json"
          errorCode:404
          errorMessage:"Not Found"
          Could not find 'Validator' with identifier 'NULL'

          JSON:
          {"ContentCreate":{"ContentType":

          {"_href":"/api/ezp/v2/content/types/18"}

          ,"mainLanguageCode":"eng-GB","LocationCreate":{"ParentLocation":

          {"_href":"/api/ezp/v2/content/locations/1/2"}

          ,"sortField":"PATH","sortOrder":"ASC"},"Section":null,"alwaysAvailable":true,"remoteId":null,"modificationDate":"2015-11-27T10:12:55.011Z","fields":{"field":[

          {"fieldDefinitionIdentifier":"name","fieldValue":"Some Test RichText"}

          ,{"fieldDefinitionIdentifier":"richtext","fieldValue":{"xml":"<section><div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"ez-embed-type-image\" data-ezelement=\"ezembed\" data-href=\"ezcontent://57\" data-ezview=\"embed\"><span data-ezelement=\"ezconfig\"><span data-ezvalue-key=\"size\" data-ezelement=\"ezvalue\">medium</span></span><img src=\"http://ezp5.rui/var/storage/images/_aliases/medium/7/8/1/0/187-1-eng-GB/21.jpg\"/></div><p xmlns=\"http://www.w3.org/1999/xhtml\"> </p></section>"}}]}}}

          Response Headers:
          Response headers (0.308 KB):undefined
          Cache-Control:"private"
          Connection:"Keep-Alive"
          Content-Length:"190"
          Content-Type:"application/vnd.ez.api.ErrorMessage+json"
          Date:"Fri, 27 Nov 2015 10:12:58 GMT"
          Keep-Alive:"timeout=5, max=100"
          Server:"Apache/2.2.22 (Debian)"
          Vary:"Cookie,Authorization"
          x-powered-by:"PHP/5.4.45-0+deb7u2"

          Request Headers:
          Host:"ezp5.rui"
          User-Agent:"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0"
          Accept:"application/vnd.ez.api.Content+json"
          Accept-Language:"en-US,en;q=0.5"
          Accept-Encoding:"gzip, deflate"
          Content-Type:"application/vnd.ez.api.ContentCreate+json; charset=UTF-8"
          X-CSRF-Token:"OXN7QuxK_6zmtZ-oE4qYodJJKsn05gyhM0seZ2ZUPHI"
          Referer:"http://ezp5.rui/ez"
          Content-Length:"909"
          Cookie:"eZSESSID98defd6ee70dfb1dea416cecdf391f58=1cdtfdb32pbima9nu5n8j43lb2"
          Connection:"keep-alive"
          Pragma:"no-cache"
          Cache-Control:"no-cache"

          I'm using, by the way, a custom content type "New Image" that only has the field types "text line" and "image", since the original Image content type also has a "richtext" "Caption".

          Show
          Rui Silva (Inactive) added a comment - - edited [~damien.pobel@ez.no] , I'm not being able to save / publish contents with a richtext fieldtype. I just installed a fresh master, and did a composer update right after. My environment: Debian 7 PHP 5.4.45-0+deb7u2 mysql Ver 14.14 Distrib 5.5.46 What I see on Firefox console: Response: ErrorMessage:Object _media-type:"application/vnd.ez.api.ErrorMessage+json" errorCode:404 errorMessage:"Not Found" Could not find 'Validator' with identifier 'NULL' JSON: {"ContentCreate":{"ContentType": {"_href":"/api/ezp/v2/content/types/18"} ,"mainLanguageCode":"eng-GB","LocationCreate":{"ParentLocation": {"_href":"/api/ezp/v2/content/locations/1/2"} ,"sortField":"PATH","sortOrder":"ASC"},"Section":null,"alwaysAvailable":true,"remoteId":null,"modificationDate":"2015-11-27T10:12:55.011Z","fields":{"field":[ {"fieldDefinitionIdentifier":"name","fieldValue":"Some Test RichText"} ,{"fieldDefinitionIdentifier":"richtext","fieldValue":{"xml":"<section><div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"ez-embed-type-image\" data-ezelement=\"ezembed\" data-href=\"ezcontent://57\" data-ezview=\"embed\"><span data-ezelement=\"ezconfig\"><span data-ezvalue-key=\"size\" data-ezelement=\"ezvalue\">medium</span></span><img src=\"http://ezp5.rui/var/storage/images/_aliases/medium/7/8/1/0/187-1-eng-GB/21.jpg\"/></div><p xmlns=\"http://www.w3.org/1999/xhtml\"> </p></section>"}}]}}} Response Headers: Response headers (0.308 KB):undefined Cache-Control:"private" Connection:"Keep-Alive" Content-Length:"190" Content-Type:"application/vnd.ez.api.ErrorMessage+json" Date:"Fri, 27 Nov 2015 10:12:58 GMT" Keep-Alive:"timeout=5, max=100" Server:"Apache/2.2.22 (Debian)" Vary:"Cookie,Authorization" x-powered-by:"PHP/5.4.45-0+deb7u2" Request Headers: Host:"ezp5.rui" User-Agent:"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0" Accept:"application/vnd.ez.api.Content+json" Accept-Language:"en-US,en;q=0.5" Accept-Encoding:"gzip, deflate" Content-Type:"application/vnd.ez.api.ContentCreate+json; charset=UTF-8" X-CSRF-Token:"OXN7QuxK_6zmtZ-oE4qYodJJKsn05gyhM0seZ2ZUPHI" Referer:"http://ezp5.rui/ez" Content-Length:"909" Cookie:"eZSESSID98defd6ee70dfb1dea416cecdf391f58=1cdtfdb32pbima9nu5n8j43lb2" Connection:"keep-alive" Pragma:"no-cache" Cache-Control:"no-cache" I'm using, by the way, a custom content type "New Image" that only has the field types "text line" and "image", since the original Image content type also has a "richtext" "Caption".
          Hide
          Bertrand Dunogier added a comment -

          Tested this morning on the built-in article type, with an embed image, and it worked as expected.

          Show
          Bertrand Dunogier added a comment - Tested this morning on the built-in article type, with an embed image, and it worked as expected.
          Hide
          Damien Pobel (Inactive) added a comment -

          [~rui.silva@ez.no] what did you do exactly in PlatformUII ? Because indeed, the fieldValue of the RichText field is not correct. The <section> element should have a xmlns attribute.

          Show
          Damien Pobel (Inactive) added a comment - [~rui.silva@ez.no] what did you do exactly in PlatformUII ? Because indeed, the fieldValue of the RichText field is not correct. The <section> element should have a xmlns attribute.
          Hide
          Bertrand Dunogier added a comment -

          What I did on my side is embed, using the UDW, an image I had created first.

          Show
          Bertrand Dunogier added a comment - What I did on my side is embed, using the UDW, an image I had created first.
          Hide
          Rui Silva (Inactive) added a comment -

          I simply installed a master, and on its default state, simply tried to create a content of any content type that has a ezfieldtype richtext, such as Article.
          When I try to save / publish it, I simply get the error I reported on the firefox console.
          Most of us at QA tried this simple test and immediately got the error, whether it be on dev or on prod environment.
          (I cannot even create a content of content type Image, I had to create a content type NewImage as said on my previous comment without the richtext field.. but then I couldn't finish the test since I cannot also publish the embedder content.)

          Show
          Rui Silva (Inactive) added a comment - I simply installed a master, and on its default state, simply tried to create a content of any content type that has a ezfieldtype richtext, such as Article. When I try to save / publish it, I simply get the error I reported on the firefox console. Most of us at QA tried this simple test and immediately got the error, whether it be on dev or on prod environment. (I cannot even create a content of content type Image, I had to create a content type NewImage as said on my previous comment without the richtext field.. but then I couldn't finish the test since I cannot also publish the embedder content.)
          Hide
          Damien Pobel (Inactive) added a comment -

          [~rui.silva@ez.no] If I understand correctly you can not create any content with a RichText field no matter if you try to add an Image or not right ? In that case, it's barely related to that issue (if we except that the fact that it prevents you from testing the new feature) so you should create another issue for that.

          Show
          Damien Pobel (Inactive) added a comment - [~rui.silva@ez.no] If I understand correctly you can not create any content with a RichText field no matter if you try to add an Image or not right ? In that case, it's barely related to that issue (if we except that the fact that it prevents you from testing the new feature) so you should create another issue for that.
          Hide
          Paulo Nunes (Inactive) added a comment -

          A new issue referring this problem was opened: EZP-25161
          So, the current issue tests are blocked by EZP-25161

          Show
          Paulo Nunes (Inactive) added a comment - A new issue referring this problem was opened: EZP-25161 So, the current issue tests are blocked by EZP-25161
          Hide
          Rui Silva (Inactive) added a comment - - edited

          Previous issue is no longer blocking these tests, but now EZP-25188 is.
          Getting an 406 POST error on publishing contents with richtext with embedded image.
          Removing the image allows to normally publish it; although this is deterrent of testing this, it doesn't appear to me that the error is directly related to this one (hence having opened it) since the error reported on the dev tools appears to be someone related to nbsp character and / or the incorrect closure of tags.

          Show
          Rui Silva (Inactive) added a comment - - edited Previous issue is no longer blocking these tests, but now EZP-25188 is. Getting an 406 POST error on publishing contents with richtext with embedded image. Removing the image allows to normally publish it; although this is deterrent of testing this, it doesn't appear to me that the error is directly related to this one (hence having opened it) since the error reported on the dev tools appears to be someone related to nbsp character and / or the incorrect closure of tags.
          Hide
          Rui Silva (Inactive) added a comment -

          EZP-25188 No longer blocks the tests for this jira, but subsequent EZP-25000 / EZP-25234 (duplicate of EZP-25000) is blocking it now.

          Show
          Rui Silva (Inactive) added a comment - EZP-25188 No longer blocks the tests for this jira, but subsequent EZP-25000 / EZP-25234 (duplicate of EZP-25000 ) is blocking it now.
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for master.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for master.

            People

            • Assignee:
              Unassigned
              Reporter:
              Damien Pobel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: