Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: QA tracked issues, 2015.09
    • Fix Version/s: 2015.11
    • Environment:

      Operating System: CentOS 7.0 x64
      PHP Version: 5.4.16
      Database and version: Mariadb 5.5
      Browser (and version): Chrome 45

      Description

      Steps to reproduce
      • Access the users page, on "Admin Panel"
      • Click Administrators link
      • Create a new user, filling in all mandatory field with valid data
      • Click "Publish" button - the error is displayed

      When the Publish button is clicked:

      An error occured while publishing the draft
      

      And in console

      PUBLISH http://ezp5.paulo/api/ezp/v2/content/objects/125/versions/1 403 (Forbidden)XmlHttpRequestConnection.execute @ CAPI.js:1406(anonymous function) @ CAPI.js:1222SessionAuthAgent.authenticateRequest @ CAPI.js:790(anonymous function) @ CAPI.js:1204SessionAuthAgent.ensureAuthentication @ CAPI.js:722ConnectionManager.request @ CAPI.js:1190ContentService.publishVersion @ CAPI.js:3878Y.eZ.Version.Y.Base.create.publishVersion @ ez-versionmodel.js:167(anonymous function) @ ez-publishdraftplugin.js:120e.bind @ oop-min.js:8(anonymous function) @ model-min.js:8(anonymous function) @ ez-contentmodel.js:124XmlHttpRequestConnection.execute.XHR.onreadystatechange @ CAPI.js:1389
      

        Issue Links

          Activity

          Hide
          Damien Pobel (Inactive) added a comment -

          Paulo Nunes can you please give the Response of the REST calls that failed ? The JS stack does not really help.

          Show
          Damien Pobel (Inactive) added a comment - Paulo Nunes can you please give the Response of the REST calls that failed ? The JS stack does not really help.
          Hide
          Paulo Nunes (Inactive) added a comment -

          [~damien.pobel@ez.no]
          When I click the "publish" button, I have 3 calls

          #1

          Remote Address:192.168.2.221:80
          Request URL:http://ezp5.paulo/api/ezp/v2/user/users?login=one1
          Request Method:HEAD
          Status Code:404 Not Found
           
          Response Headers
          view source
          Cache-Control:private
          Connection:Keep-Alive
          Content-Type:application/vnd.ez.api.ErrorMessage+xml
          Date:Mon, 12 Oct 2015 15:39:42 GMT
          Keep-Alive:timeout=5, max=100
          Server:Apache/2.4.6 (CentOS) PHP/5.4.16
          Vary:X-User-Hash
          X-Powered-By:PHP/5.4.16
           
          Request Headers
          view source
          Accept:*/*
          Accept-Encoding:gzip, deflate, sdch
          Accept-Language:en-US,en;q=0.8,pt-PT;q=0.6,pt;q=0.4
          Connection:keep-alive
          Content-Length:0
          Cookie:eZSESSID=qb9h0shkj7rmbk1dkm3lnl8ql6
          DNT:1
          Host:ezp5.paulo
          Referer:http://ezp5.paulo/ez
          User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2447.0 Safari/537.36
           
          Query String Parameters
          view source
          view URL encoded
          login:one1
          

          #2

          Remote Address:192.168.2.221:80
          Request URL:http://ezp5.paulo/api/ezp/v2/content/objects
          Request Method:POST
          Status Code:201 Created
          Response Headers
          view source
          Accept-Patch:application/vnd.ez.api.ContentUpdate+json
          Cache-Control:private
          Connection:Keep-Alive
          Content-Length:2773
          Content-Type:application/vnd.ez.api.Content+json
          Date:Mon, 12 Oct 2015 15:39:43 GMT
          Keep-Alive:timeout=5, max=100
          Location:/api/ezp/v2/content/objects/151
          Server:Apache/2.4.6 (CentOS) PHP/5.4.16
          Vary:Cookie,Authorization
          X-Powered-By:PHP/5.4.16
          Request Headers
          view source
          Accept:application/vnd.ez.api.Content+json
          Accept-Encoding:gzip, deflate
          Accept-Language:en-US,en;q=0.8,pt-PT;q=0.6,pt;q=0.4
          Connection:keep-alive
          Content-Length:642
          Content-Type:application/vnd.ez.api.ContentCreate+json
          Cookie:eZSESSID=qb9h0shkj7rmbk1dkm3lnl8ql6
          DNT:1
          Host:ezp5.paulo
          Origin:http://ezp5.paulo
          Referer:http://ezp5.paulo/ez
          User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2447.0 Safari/537.36
          X-CSRF-Token:GkQ-u6VhtbHj2XpHFTSuXgRbZMV3VWhMyPYmhPFZiF4
          Request Payload
          view source
          {ContentCreate: {ContentType: {_href: "/api/ezp/v2/content/types/4"}, mainLanguageCode: "eng-GB",…}}
          ContentCreate: {ContentType: {_href: "/api/ezp/v2/content/types/4"}, mainLanguageCode: "eng-GB",…}
          

          With response

          {"Content":{"_media-type":"application\/vnd.ez.api.Content+json","_href":"\/api\/ezp\/v2\/content\/objects\/151","_remoteId":"93ca0edbbe49a9a5f316d447b224da85","_id":151,"ContentType":{"_media-type":"application\/vnd.ez.api.ContentType+json","_href":"\/api\/ezp\/v2\/content\/types\/4"},"Name":"one one","Versions":{"_media-type":"application\/vnd.ez.api.VersionList+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/versions"},"CurrentVersion":{"_media-type":"application\/vnd.ez.api.Version+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/currentversion","Version":{"_media-type":"application\/vnd.ez.api.Version+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/versions\/1","VersionInfo":{"id":637,"versionNo":1,"status":"PUBLISHED","modificationDate":"2015-10-12T16:39:43+01:00","Creator":{"_media-type":"application\/vnd.ez.api.User+json","_href":"\/api\/ezp\/v2\/user\/users\/14"},"creationDate":"2015-10-12T16:39:43+01:00","initialLanguageCode":"eng-GB","languageCodes":"eng-GB","names":{"value":[{"_languageCode":"eng-GB","#text":"one one"}]},"Content":{"_media-type":"application\/vnd.ez.api.ContentInfo+json","_href":"\/api\/ezp\/v2\/content\/objects\/151"}},"Fields":{"field":[{"id":848,"fieldDefinitionIdentifier":"first_name","languageCode":"eng-GB","fieldValue":"one"},{"id":849,"fieldDefinitionIdentifier":"last_name","languageCode":"eng-GB","fieldValue":"one"},{"id":850,"fieldDefinitionIdentifier":"user_account","languageCode":"eng-GB","fieldValue":{"hasStoredLogin":true,"contentId":151,"login":"one1","email":"one@test.com","passwordHash":"9713122aa3db74e199d79a670a58f841","passwordHashType":"2","enabled":true,"maxLogin":0}},{"id":851,"fieldDefinitionIdentifier":"signature","languageCode":"eng-GB","fieldValue":null},{"id":852,"fieldDefinitionIdentifier":"image","languageCode":"eng-GB","fieldValue":null}]},"Relations":{"_media-type":"application\/vnd.ez.api.RelationList+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/versions\/1\/relations","Relation":[]}}},"Section":{"_media-type":"application\/vnd.ez.api.Section+json","_href":"\/api\/ezp\/v2\/content\/sections\/2"},"MainLocation":{"_media-type":"application\/vnd.ez.api.Location+json","_href":"\/api\/ezp\/v2\/content\/locations\/1\/5\/14\/155"},"Locations":{"_media-type":"application\/vnd.ez.api.LocationList+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/locations"},"Owner":{"_media-type":"application\/vnd.ez.api.User+json","_href":"\/api\/ezp\/v2\/user\/users\/14"},"lastModificationDate":"2015-10-12T16:39:43+01:00","publishedDate":"2015-10-12T16:39:43+01:00","mainLanguageCode":"eng-GB","alwaysAvailable":true,"ObjectStates":{"_media-type":"application\/vnd.ez.api.ContentObjectStates+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/objectstates"}}}
          

          #3

          Remote Address:192.168.2.221:80
          Request URL:http://ezp5.paulo/api/ezp/v2/content/objects/151/versions/1
          Request Method:PUBLISH
          Status Code:403 Forbidden
           
          Response Headers
          view source
          Cache-Control:private
          Connection:Keep-Alive
          Content-Length:268
          Content-Type:application/vnd.ez.api.ErrorMessage+xml
          Date:Mon, 12 Oct 2015 15:39:43 GMT
          Keep-Alive:timeout=5, max=99
          Server:Apache/2.4.6 (CentOS) PHP/5.4.16
          Vary:Cookie,Authorization
          X-Powered-By:PHP/5.4.16
           
          Request Headers
          view source
          Accept:*/*
          Accept-Encoding:gzip, deflate, sdch
          Accept-Language:en-US,en;q=0.8,pt-PT;q=0.6,pt;q=0.4
          Connection:keep-alive
          Content-Length:0
          Content-Type:text/plain;charset=UTF-8
          Cookie:eZSESSID=qb9h0shkj7rmbk1dkm3lnl8ql6
          DNT:1
          Host:ezp5.paulo
          Origin:http://ezp5.paulo
          Referer:http://ezp5.paulo/ez
          User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2447.0 Safari/537.36
          X-CSRF-Token:GkQ-u6VhtbHj2XpHFTSuXgRbZMV3VWhMyPYmhPFZiF4
          

          With response

          <?xml version="1.0" encoding="UTF-8"?>
          <ErrorMessage media-type="application/vnd.ez.api.ErrorMessage+xml"><errorCode>403</errorCode><errorMessage>Forbidden</errorMessage><errorDescription>Only version in status DRAFT can be published</errorDescription></ErrorMessage>
          

          Show
          Paulo Nunes (Inactive) added a comment - [~damien.pobel@ez.no] When I click the "publish" button, I have 3 calls #1 Remote Address:192.168.2.221:80 Request URL:http://ezp5.paulo/api/ezp/v2/user/users?login=one1 Request Method:HEAD Status Code:404 Not Found   Response Headers view source Cache-Control:private Connection:Keep-Alive Content-Type:application/vnd.ez.api.ErrorMessage+xml Date:Mon, 12 Oct 2015 15:39:42 GMT Keep-Alive:timeout=5, max=100 Server:Apache/2.4.6 (CentOS) PHP/5.4.16 Vary:X-User-Hash X-Powered-By:PHP/5.4.16   Request Headers view source Accept:*/* Accept-Encoding:gzip, deflate, sdch Accept-Language:en-US,en;q=0.8,pt-PT;q=0.6,pt;q=0.4 Connection:keep-alive Content-Length:0 Cookie:eZSESSID=qb9h0shkj7rmbk1dkm3lnl8ql6 DNT:1 Host:ezp5.paulo Referer:http://ezp5.paulo/ez User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2447.0 Safari/537.36   Query String Parameters view source view URL encoded login:one1 #2 Remote Address:192.168.2.221:80 Request URL:http://ezp5.paulo/api/ezp/v2/content/objects Request Method:POST Status Code:201 Created Response Headers view source Accept-Patch:application/vnd.ez.api.ContentUpdate+json Cache-Control:private Connection:Keep-Alive Content-Length:2773 Content-Type:application/vnd.ez.api.Content+json Date:Mon, 12 Oct 2015 15:39:43 GMT Keep-Alive:timeout=5, max=100 Location:/api/ezp/v2/content/objects/151 Server:Apache/2.4.6 (CentOS) PHP/5.4.16 Vary:Cookie,Authorization X-Powered-By:PHP/5.4.16 Request Headers view source Accept:application/vnd.ez.api.Content+json Accept-Encoding:gzip, deflate Accept-Language:en-US,en;q=0.8,pt-PT;q=0.6,pt;q=0.4 Connection:keep-alive Content-Length:642 Content-Type:application/vnd.ez.api.ContentCreate+json Cookie:eZSESSID=qb9h0shkj7rmbk1dkm3lnl8ql6 DNT:1 Host:ezp5.paulo Origin:http://ezp5.paulo Referer:http://ezp5.paulo/ez User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2447.0 Safari/537.36 X-CSRF-Token:GkQ-u6VhtbHj2XpHFTSuXgRbZMV3VWhMyPYmhPFZiF4 Request Payload view source {ContentCreate: {ContentType: {_href: "/api/ezp/v2/content/types/4"}, mainLanguageCode: "eng-GB",…}} ContentCreate: {ContentType: {_href: "/api/ezp/v2/content/types/4"}, mainLanguageCode: "eng-GB",…} With response {"Content":{"_media-type":"application\/vnd.ez.api.Content+json","_href":"\/api\/ezp\/v2\/content\/objects\/151","_remoteId":"93ca0edbbe49a9a5f316d447b224da85","_id":151,"ContentType":{"_media-type":"application\/vnd.ez.api.ContentType+json","_href":"\/api\/ezp\/v2\/content\/types\/4"},"Name":"one one","Versions":{"_media-type":"application\/vnd.ez.api.VersionList+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/versions"},"CurrentVersion":{"_media-type":"application\/vnd.ez.api.Version+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/currentversion","Version":{"_media-type":"application\/vnd.ez.api.Version+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/versions\/1","VersionInfo":{"id":637,"versionNo":1,"status":"PUBLISHED","modificationDate":"2015-10-12T16:39:43+01:00","Creator":{"_media-type":"application\/vnd.ez.api.User+json","_href":"\/api\/ezp\/v2\/user\/users\/14"},"creationDate":"2015-10-12T16:39:43+01:00","initialLanguageCode":"eng-GB","languageCodes":"eng-GB","names":{"value":[{"_languageCode":"eng-GB","#text":"one one"}]},"Content":{"_media-type":"application\/vnd.ez.api.ContentInfo+json","_href":"\/api\/ezp\/v2\/content\/objects\/151"}},"Fields":{"field":[{"id":848,"fieldDefinitionIdentifier":"first_name","languageCode":"eng-GB","fieldValue":"one"},{"id":849,"fieldDefinitionIdentifier":"last_name","languageCode":"eng-GB","fieldValue":"one"},{"id":850,"fieldDefinitionIdentifier":"user_account","languageCode":"eng-GB","fieldValue":{"hasStoredLogin":true,"contentId":151,"login":"one1","email":"one@test.com","passwordHash":"9713122aa3db74e199d79a670a58f841","passwordHashType":"2","enabled":true,"maxLogin":0}},{"id":851,"fieldDefinitionIdentifier":"signature","languageCode":"eng-GB","fieldValue":null},{"id":852,"fieldDefinitionIdentifier":"image","languageCode":"eng-GB","fieldValue":null}]},"Relations":{"_media-type":"application\/vnd.ez.api.RelationList+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/versions\/1\/relations","Relation":[]}}},"Section":{"_media-type":"application\/vnd.ez.api.Section+json","_href":"\/api\/ezp\/v2\/content\/sections\/2"},"MainLocation":{"_media-type":"application\/vnd.ez.api.Location+json","_href":"\/api\/ezp\/v2\/content\/locations\/1\/5\/14\/155"},"Locations":{"_media-type":"application\/vnd.ez.api.LocationList+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/locations"},"Owner":{"_media-type":"application\/vnd.ez.api.User+json","_href":"\/api\/ezp\/v2\/user\/users\/14"},"lastModificationDate":"2015-10-12T16:39:43+01:00","publishedDate":"2015-10-12T16:39:43+01:00","mainLanguageCode":"eng-GB","alwaysAvailable":true,"ObjectStates":{"_media-type":"application\/vnd.ez.api.ContentObjectStates+json","_href":"\/api\/ezp\/v2\/content\/objects\/151\/objectstates"}}} #3 Remote Address:192.168.2.221:80 Request URL:http://ezp5.paulo/api/ezp/v2/content/objects/151/versions/1 Request Method:PUBLISH Status Code:403 Forbidden   Response Headers view source Cache-Control:private Connection:Keep-Alive Content-Length:268 Content-Type:application/vnd.ez.api.ErrorMessage+xml Date:Mon, 12 Oct 2015 15:39:43 GMT Keep-Alive:timeout=5, max=99 Server:Apache/2.4.6 (CentOS) PHP/5.4.16 Vary:Cookie,Authorization X-Powered-By:PHP/5.4.16   Request Headers view source Accept:*/* Accept-Encoding:gzip, deflate, sdch Accept-Language:en-US,en;q=0.8,pt-PT;q=0.6,pt;q=0.4 Connection:keep-alive Content-Length:0 Content-Type:text/plain;charset=UTF-8 Cookie:eZSESSID=qb9h0shkj7rmbk1dkm3lnl8ql6 DNT:1 Host:ezp5.paulo Origin:http://ezp5.paulo Referer:http://ezp5.paulo/ez User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2447.0 Safari/537.36 X-CSRF-Token:GkQ-u6VhtbHj2XpHFTSuXgRbZMV3VWhMyPYmhPFZiF4 With response <?xml version="1.0" encoding="UTF-8"?> <ErrorMessage media-type="application/vnd.ez.api.ErrorMessage+xml"><errorCode>403</errorCode><errorMessage>Forbidden</errorMessage><errorDescription>Only version in status DRAFT can be published</errorDescription></ErrorMessage>
          Hide
          Damien Pobel (Inactive) added a comment -

          only the failing one is interesting

          Show
          Damien Pobel (Inactive) added a comment - only the failing one is interesting
          Hide
          Bertrand Dunogier added a comment -

          PR @ https://github.com/ezsystems/PlatformUIBundle/pull/393. Publish should work fine with this.

          Show
          Bertrand Dunogier added a comment - PR @ https://github.com/ezsystems/PlatformUIBundle/pull/393 . Publish should work fine with this.
          Hide
          Bertrand Dunogier added a comment -

          Will be resolved when EZP-25024 is implemented.

          Show
          Bertrand Dunogier added a comment - Will be resolved when EZP-25024 is implemented.
          Hide
          Damien Pobel (Inactive) added a comment -

          Bertrand Dunogier so this can be closed ? (trying to cleanup a bit the board )

          Show
          Damien Pobel (Inactive) added a comment - Bertrand Dunogier so this can be closed ? (trying to cleanup a bit the board )
          Hide
          Paulo Nunes (Inactive) added a comment - - edited

          As far as i can see from today's master, the current issue is no longer happening.
          I'll close the issue

          Edit:
          Bertrand Dunogier: The issue is currently assigned to you. It's ok by you for this to be closed?

          Show
          Paulo Nunes (Inactive) added a comment - - edited As far as i can see from today's master, the current issue is no longer happening. I'll close the issue Edit: Bertrand Dunogier : The issue is currently assigned to you. It's ok by you for this to be closed?
          Hide
          Bertrand Dunogier added a comment -
          Show
          Bertrand Dunogier added a comment - Yes, Paulo Nunes .
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved

          Show
          Paulo Nunes (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Paulo Nunes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: