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

fix(page): Issues switching PageView Refs: #31362 #31386

Closed

Conversation

fabrizzio-dotCMS
Copy link
Contributor

@fabrizzio-dotCMS fabrizzio-dotCMS commented Feb 14, 2025

Problem

When switching between Draft, Edit, Preview, and Live modes to visualize pages, the current approach relies too heavily on session-scoped variables to determine the Page Mode (e.g., Live or Working). This fragility led to a bug where an unexpected request set an incorrect Page Mode value (such as Navigate or Preview) at the session level, causing the Live view to break. As a result, the Image API could not return the expected image.

Proposed Changes

The Page Mode should not be set at the session level. If the Page Mode can be passed as a variable (such as through the Request), it should be done this way. This Pull Request refactors the handling of Page Mode to avoid a session-based state whenever possible, ensuring more predictable and stable behavior across different rendering modes.

Copy link

Please use a Conventional Commit title format for this PR. For more information, see https://www.conventionalcommits.org/en/v1.0.0/

@fabrizzio-dotCMS fabrizzio-dotCMS changed the title #31362 fix(Page) Issues switching PageView Refs: #31362 Feb 14, 2025
Copy link

Please use a Conventional Commit title format for this PR. For more information, see https://www.conventionalcommits.org/en/v1.0.0/

@fabrizzio-dotCMS fabrizzio-dotCMS marked this pull request as ready for review February 17, 2025 16:19
@fabrizzio-dotCMS fabrizzio-dotCMS marked this pull request as draft February 17, 2025 16:36
@fabrizzio-dotCMS fabrizzio-dotCMS marked this pull request as ready for review February 18, 2025 14:08
@zJaaal zJaaal changed the title fix(Page) Issues switching PageView Refs: #31362 fix(Page): Issues switching PageView Refs: #31362 Feb 18, 2025
@zJaaal zJaaal changed the title fix(Page): Issues switching PageView Refs: #31362 fix(page): Issues switching PageView Feb 18, 2025
@fabrizzio-dotCMS fabrizzio-dotCMS changed the title fix(page): Issues switching PageView fix(page): Issues switching PageView Refs: #31362 Feb 18, 2025
@fabrizzio-dotCMS fabrizzio-dotCMS deleted the issue-31362-inconsisten-image-swithing-mode branch February 18, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant