Details
-
Bug
-
Resolution: Obsolete
-
High
-
None
-
None
-
None
-
Prod
Description
During development in Studio ( steps exactly as in task https://jira.ez.no/browse/EZS-793 ), on clear database we create draft from existing content "Why we love NYC" and after "Confirm" we don't see all versions of content. We should see 2 versions (Publish and Draft), but we see only Publish version.
It is causes because after click on Confirm, are running 3 endpoints :
1) Request URL:http://ezstudio.dev.local/api/ezp/v2/content/objects/68
Request Method:GET
In this method is cacheable in Http and in persistance.
2) ttp://ezstudio.dev.local/api/ezp/v2/content/objects/68/currentversion
Request Method:POST
In this method is not cacheable.
3) http://ezstudio.dev.local/api/ezp/v2/content/objects/68/versions
Request Method:GET
In this method is not cacheable in persistance, but controller return list from http cache
In file eZ/Publish/Core/REST/Server/Controller/Content.php we modified method loadContentVersions and it helps :
public function loadContentVersions($contentId, Request $request) { $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId); return new Values\VersionList( $this->repository->getContentService()->loadVersions($contentInfo), $request->getPathInfo() ); }