Page preview not working throwing exception on missing layout

Description

Hi,

The preview page functionality in administrator fails. A minor bug but a nuisance for content writers.

Open up ContentBox Administrator, go to Sitemap and open any page in editor. Click on the Preview icon and the following error will appear:

Houston we have a problem
Fault action: preview

The Page handler, preview() appears to use a BaseContent object instead of a Page object. Some of the comments in the code are incorrect (probably copy and paste from Entry handler).

To fix:

Page Handler Line 44: Instead of
prc.page = contentService.new();
use
prc.page = pageService.new();

Need to inject pageService as well : property name="pageService" inject="idageService@cb";

Above fixes the preview but I haven't thoroughly tested with adding parent pages and different layouts.

If you could check that would be awesome. Thanks. Appears in 4.1 and BE.

Status

Assignee

Unassigned

Reporter

Angus Johnson

Labels

None

Components

Fix versions

Affects versions

4.1.0

Priority

Minor
Configure