When making an API call to content or a list of content, we are automatically trying to render the widgets in that content. We should only be doing this if the api call has specified to return rendered content - this is currently causing issues in authoring as there is a widget that is doing $request.sendRedirect("https://google.com") and things like that that mungs up the underlying API request object.
Steps to Reproduce
Create a new code widget with the value ${request.session.invalidate()}. Hit this widget from the backend using the content API - e.g. using a url like
You should have to pass /render/true or ?render=true in order for velocity to try to render the content. Also, we should not be reusing the underlying API request when doing the render and instead should be using a MockRequest that has the same properties to avoid any underlying funk.
Acceptance Criteria
Have to pass /render/true or ?render=true in order for velocity to try to render the content.
dotCMS Version
23.06
Proposed Objective
Reliability
Proposed Priority
Priority 2 - Important
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
Parent Issue
No response
Problem Statement
When making an API call to content or a list of content, we are automatically trying to render the widgets in that content. We should only be doing this if the api call has specified to return rendered content - this is currently causing issues in authoring as there is a widget that is doing
$request.sendRedirect("https://google.com")
and things like that that mungs up the underlying API request object.Steps to Reproduce
Create a new code widget with the value
${request.session.invalidate()}
. Hit this widget from the backend using the content API - e.g. using a url likehttps://demo.dotcms.com/api/content/id/d89d04a50c0724428d86fd12194194be And it will cause you to logout.
You should have to pass
/render/true
or?render=true
in order for velocity to try to render the content. Also, we should not be reusing the underlying API request when doing the render and instead should be using a MockRequest that has the same properties to avoid any underlying funk.Acceptance Criteria
Have to pass
/render/true
or?render=true
in order for velocity to try to render the content.dotCMS Version
23.06
Proposed Objective
Reliability
Proposed Priority
Priority 2 - Important
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
No response
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response