Details
-
Bug
-
Resolution: Fixed
-
High
-
3.0.0-rc1
Description
Preview for Landing Page for blocks breaks when a draft is saved.
Steps to reproduce:
- Login as admin
- Go to Content -> Content Structure
- Start creating a new Landing Page
- Fill in Page Title and Description: "TestLP"
- Add a Code block with text "TestBlock"
- Click "Save draft"
Expected:
Draft is saved. Preview for Landing page is rendered correctly
Actual:
Draft is saved. Block preview is not rendered, instead an exception is shown:
[2020-03-25T12:19:12.609885+00:00] request.CRITICAL: Uncaught PHP Exception TypeError: "Argument 1 passed to eZ\Publish\Core\Repository\SiteAccessAware\LocationService::loadLocation() must be of the type int, null given, called in /Users/mareknocon/Desktop/Sites/v3/vendor/ezsystems/ezplatform-page-fieldtype/src/lib/Event/Subscriber/BlockContextSubscriber.php on line 90" at /Users/mareknocon/Desktop/Sites/v3/vendor/ezsystems/ezplatform-kernel/eZ/Publish/Core/Repository/SiteAccessAware/LocationService.php line 52 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to eZ\\Publish\\Core\\Repository\\SiteAccessAware\\LocationService::loadLocation() must be of the type int, null given, called in /Users/mareknocon/Desktop/Sites/v3/vendor/ezsystems/ezplatform-page-fieldtype/src/lib/Event/Subscriber/BlockContextSubscriber.php on line 90 at /Users/mareknocon/Desktop/Sites/v3/vendor/ezsystems/ezplatform-kernel/eZ/Publish/Core/Repository/SiteAccessAware/LocationService.php:52)