- Issue created by @fago
We have redirection logic that routes to the backend, whenever an URL is accessed that shall render into custom_elements but does not support it.
Example:
https://lupus-decoupled.ddev.site/ce-api/node/1/edit
->
Redirects to https://lupus-decoupled.ddev.site/ce-api/node/1/edit
That example works good.
However, when there is a route which has is specified to be of format custom_elements, but was not requested like this, then the same happens. Then the redirect is
/route-with-format-ce-but-no-ce-response --> redirects to /route-with-format-ce-but-no-ce-response
This does not make sense.
Define new route with _format = custom_elements
Return render array without CE.
Open it.
To avoid this, we shall not apply the redirect if there is only one single format registered for the given route AND the format is custom_elements. In that case we could even force-render it with custom-elements, since it was defined like this, or error out.
Solve and write test coverage
Active
2.3
Code