Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Widgets are being rendered when converting to json without having to pass the render flag #25523

Open
wezell opened this issue Jul 14, 2023 · 4 comments

Comments

@wezell
Copy link
Contributor

wezell commented Jul 14, 2023

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 like

https://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

@wezell wezell changed the title All Widgets are being rendered without having to pass the render flag All Widgets are being rendered when converting to json without having to pass the render flag Jul 14, 2023
@erickgonzalez
Copy link
Contributor

Reproducible on 23.01 LTS but no on 22.03 LTS

wezell added a commit that referenced this issue Jul 14, 2023
@wezell
Copy link
Contributor Author

wezell commented Jul 14, 2023

Caused by the changes here: #21079

wezell added a commit that referenced this issue Jul 14, 2023
wezell added a commit that referenced this issue Jul 17, 2023
@nollymar nollymar self-assigned this Jul 18, 2023
@nollymar nollymar moved this from New to In Progress in dotCMS - Product Planning Jul 18, 2023
@nollymar nollymar linked a pull request Jul 18, 2023 that will close this issue
wezell added a commit that referenced this issue Jul 18, 2023
wezell added a commit that referenced this issue Jul 20, 2023
wezell added a commit that referenced this issue Jul 20, 2023
wezell added a commit that referenced this issue Jul 20, 2023
@nollymar nollymar removed their assignment Aug 1, 2023
@nollymar nollymar moved this from In Progress to Current Sprint Backlog in dotCMS - Product Planning Aug 1, 2023
@nollymar nollymar moved this from Current Sprint Backlog to New in dotCMS - Product Planning Oct 9, 2023
@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the stale label Oct 17, 2023
@fmontes fmontes moved this from New to Gardening Day Backlog in dotCMS - Product Planning Sep 6, 2024
@fabrizzio-dotCMS fabrizzio-dotCMS self-assigned this Nov 15, 2024
@fabrizzio-dotCMS fabrizzio-dotCMS moved this from Gardening Day Backlog to In Progress in dotCMS - Product Planning Nov 15, 2024
fabrizzio-dotCMS added a commit that referenced this issue Nov 15, 2024
Copy link

PRs:

fabrizzio-dotCMS added a commit that referenced this issue Nov 16, 2024
fabrizzio-dotCMS added a commit that referenced this issue Nov 18, 2024
fabrizzio-dotCMS added a commit that referenced this issue Nov 18, 2024
fabrizzio-dotCMS added a commit that referenced this issue Nov 18, 2024
fabrizzio-dotCMS added a commit that referenced this issue Nov 19, 2024
fabrizzio-dotCMS added a commit that referenced this issue Nov 19, 2024
fabrizzio-dotCMS added a commit that referenced this issue Nov 19, 2024
fabrizzio-dotCMS added a commit that referenced this issue Nov 19, 2024
fabrizzio-dotCMS added a commit that referenced this issue Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

4 participants