Pier Missing a Template

In recent days, when importing a pier extract into a clean image, it has shown up as:

Picture of missing Environment
The problem is it has a link to content, but does not have the content embedded in the page -- all the pages look the same. The problem is the localEnvironment is set to a page named environment that has no content or a parent. In the default pier install, the localEnvironment is nil.

This can be fixed by running:

PRKernel instances anyOne root localEnvironment parent ifNil: [ PRKernel instances anyOne root localEnvironment: (PRPathLookup start: PRKernel instances anyOne root path: '/system/templates/environment') ].

In a similar manner, the missing CSS can be resolved with:

PRKernel instances anyOne root localStyleSheet: (PRPathLookup start: PRKernel instances anyOne root path: '/system/components/StyleSheet').

Another solution is to have the settings setup so the environment is taken from /template - this is how recent Pier installs are setup. Older versions were set to use the above /system/templates/environment.

Posted by John Borden at 28 June 2025, 11:15 pm with tags Pier link

Comments

After some testing, using /templates does not always work.

Posted by John Borden at 28 June 2025, 11:17 pm link