apostrophecms / apostrophe

A full-featured, open-source content management framework built with Node.js that empowers organizations by combining in-context editing and headless architecture in a full-stack JS environment.
https://apostrophecms.com
Other
4.37k stars 590 forks source link

PRO-6742: don't fall over if there is no context page or piece #4780

Closed boutell closed 1 month ago

boutell commented 1 month ago

Summary

The admin UI now functions reasonably when the current URL was rendered directly with sendPage and there is no "in context" page or piece.

What are the specific steps to test this change?

I tested this fix in BM's project, then gave them a simpler way since their situation really did call for a "current page" to exist anyway (they were implementing fancy rendering of a parked page and didn't know about dispatch yet).

What kind of change does this PR introduce?

(Check at least one)

Make sure the PR fulfills these requirements:

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

linear[bot] commented 1 month ago

PRO-6742 Assistance with rendering a template with correct data so that Palette is available.