Problem/Motivation
As a developer who is using preview with the next-drupal-starter, I expect preview to function regardless of which path alias patterns I am using.
The FE preview API route assumes the the object name is the same as the first path argument, which may not be true as people customize sites. If preview passes this data, the API route will be able to more accurately validate preview routes.
Proposed resolution
* When Decoupled Preview redirects to the Next Starter Preview API endpoint, an objectName query string parameter is included in the request.
* The value should be entity type and bundle for the content being previewed, separated by -- - for example, node--article
Query params for the redirect look to be set in src/Form/EditPreviewForm.php
Issue fork decoupled_preview-3294745
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
abhisekmazumdarComment #6
brianperryMerged and released as Alpha 2. Thanks @abhisekmazumdar!