Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixed EZP-22823: exception in Preview w/ website toolbar #83
An exception is thrown by Twig/Stash if the websitetoolbar is enabled with the provided configuration, and a Preview is requested.
In the PreviewController, a fake Location is created, with among others
If we go this way, it also needs to be documented like this.
referenced this pull request
May 9, 2014
1 similar comment
@pspanja Discussed this with @bdunogier and I suggested if we want to fix this in template in a forward compatible and clean way we should add parts of the API value object changes suggested for Location draft, but not add service api's and implementation for it yet. This would allow preview helper to specify the fake Location returned in ezsystems/ezpublish-kernel@73a7e97#commitcomment-6268391 to be a draft, so that the check here can check if location is draft or not instead of having a "hack" checking if id is null.
Basically this change: ezsystems/ezpublish-kernel@6e79bd7 without the ws issue.
What do you think?
(but for better template use we should consider also adding a method like isDraft() so template does not have to hardcode status values)