Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-1431

Landing Page not editable after deleting embedded content

    XMLWordPrintable

Details

    Description

      If we delete a content which is embedded on a landing page block, it will cause errors, since the reference on the landing page is still kept.

      Steps to reproduce:

      1. create landing page
      2. add embed block
      3. select any content
      4. publish landing page
      5. delete embedded content
      6. empty trash
      7. clear cache
      8. try to edit landing page where now deleted content was embedded

      These are the results:

      Request headers:

      POST /studio/preview/block HTTP/1.1
      Host: ezenterprise18-studio-clean.local
      Connection: keep-alive
      Content-Length: 928
      Origin: http://ezenterprise18-studio-clean.local
      X-Requested-With: XMLHttpRequest
      User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36
      Content-Type: application/x-www-form-urlencoded; charset=UTF-8
      Accept: */*
      Referer: http://ezenterprise18-studio-clean.local/ez
      Accept-Encoding: gzip, deflate
      Accept-Language: en-US,en;q=0.8,pt;q=0.6
      Cookie: eZSESSID98defd6ee70dfb1dea416cecdf391f58=q4fj8lqiuuae3vt5l3auvivh61
      

      Response headers:

      HTTP/1.1 404 Not Found
      Date: Fri, 17 Mar 2017 11:35:02 GMT
      Server: Apache/2.4.18 (Ubuntu)
      Cache-Control: max-age=60, public, s-maxage=60
      Vary: 
      Content-Length: 471
      Keep-Alive: timeout=5, max=100
      Connection: Keep-Alive
      Content-Type: text/html; charset=UTF-8
      

      Response:

      <!DOCTYPE html>
      <html>
          <head>
              <meta charset="UTF-8" />
              <title>An Error Occurred: Not Found</title>
          </head>
          <body>
              <h1>Oops! An Error Occurred</h1>
              <h2>The server returned a "404 Not Found".</h2>
      
              <div>
                  Something is broken. Please let us know what you were doing when this error occurred.
                  We will fix it as soon as possible. Sorry for any inconvenience caused.
              </div>
          </body>
      </html>
      

      Curl:

      curl "http://ezenterprise18-studio-clean.local/studio/preview/block" -H "Cookie: eZSESSID98defd6ee70dfb1dea416cecdf391f58=q4fj8lqiuuae3vt5l3auvivh61" -H "Origin: http://ezenterprise18-studio-clean.local" -H "Accept-Encoding: gzip, deflate" -H "Accept-Language: en-US,en;q=0.8,pt;q=0.6" -H "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36" -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "Accept: */*" -H "Referer: http://ezenterprise18-studio-clean.local/ez" -H "X-Requested-With: XMLHttpRequest" -H "Connection: keep-alive" --data "blockIds^%^5B^%^5D=b-fbe4877d-eafe-e650-2f03-58db9bf2df06^&blockIds^%^5B^%^5D=b-dd389fff-bd86-952a-dfd8-fbe18c6a9412^&page=^%^7B^%^22page^%^22^%^3A^%^7B^%^22layout^%^22^%^3A^%^22default^%^22^%^2C^%^22title^%^22^%^3A^%^22Home^%^22^%^2C^%^22zones^%^22^%^3A^%^5B^%^7B^%^22id^%^22^%^3A^%^22default_id^%^22^%^2C^%^22name^%^22^%^3A^%^22default^%^22^%^2C^%^22blocks^%^22^%^3A^%^5B^%^7B^%^22id^%^22^%^3A^%^22b-fbe4877d-eafe-e650-2f03-58db9bf2df06^%^22^%^2C^%^22type^%^22^%^3A^%^22tag^%^22^%^2C^%^22name^%^22^%^3A^%^22Tag^%^22^%^2C^%^22view^%^22^%^3A^%^22default^%^22^%^2C^%^22ttl^%^22^%^3A^%^220^%^22^%^2C^%^22attributes^%^22^%^3A^%^7B^%^22content^%^22^%^3A^%^22^%^3Ch1^%^3EeZ^%^20Studio^%^3C^%^2Fh1^%^3E^%^20^%^3Cp^%^3EThis^%^20is^%^20the^%^20clean^%^20install^%^20coming^%^20with^%^20eZ^%^20Studio.^%^20Now^%^20you^%^20can^%^20start^%^20creating^%^20your^%^20own^%^20design.^%^3C^%^2Fp^%^3E^%^22^%^7D^%^7D^%^2C^%^7B^%^22id^%^22^%^3A^%^22b-dd389fff-bd86-952a-dfd8-fbe18c6a9412^%^22^%^2C^%^22type^%^22^%^3A^%^22embed^%^22^%^2C^%^22name^%^22^%^3A^%^22Embed^%^22^%^2C^%^22view^%^22^%^3A^%^22default^%^22^%^2C^%^22ttl^%^22^%^3A^%^220^%^22^%^2C^%^22attributes^%^22^%^3A^%^7B^%^22contentId^%^22^%^3A^%^22101^%^22^%^7D^%^7D^%^5D^%^7D^%^5D^%^7D^%^7D^&date=1489750500" --compressed
      

      If we try to edit the following call is done:
      Headers

      General
      Request URL:http://ezenterprise18-studio-clean.local/api/ezp/v2/content/objects/101
      Request Method:GET
      Status Code:404 Not Found (from disk cache)
      Remote Address:192.168.2.89:80
      Referrer Policy:no-referrer-when-downgrade
      
      Response Headers
      Age:0
      Cache-Control:max-age=60, public, s-maxage=60
      Content-Length:448
      Content-Type:application/vnd.ez.api.ErrorMessage+json
      Date:Fri, 17 Mar 2017 11:39:13 GMT
      Server:Apache/2.4.18 (Ubuntu)
      Vary:X-User-Hash
      X-Content-Digest:ene6181c096e7db12d781cb92348dfad689a69d81fd8a5914a7424795ca799cb2c
      
      Request Headers
      Provisional headers are shown
      Accept:application/vnd.ez.api.ContentInfo+json
      Referer:http://ezenterprise18-studio-clean.local/ez
      User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36
      

      Response:

      {"ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":404,"errorMessage":"Not Found","errorDescription":"Could not find 'Content' with identifier '101'","Previous":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":404,"errorMessage":"Not Found","errorDescription":"Could not find 'content' with identifier 'id: 101'"}}}}
      

      Curl:

      curl "http://ezenterprise18-studio-clean.local/api/ezp/v2/content/objects/101" -H "Accept: application/vnd.ez.api.ContentInfo+json" -H "Referer: http://ezenterprise18-studio-clean.local/ez" -H "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36" --compressed
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ricardo.correia-obsolete@ez.no Ricardo Correia (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: