Skip to content

Fix admin bug with sections preview - #5

Merged
javihgil merged 4 commits into
5.5from
fix-admin-bug-with-sections-preview
Feb 25, 2026
Merged

Fix admin bug with sections preview#5
javihgil merged 4 commits into
5.5from
fix-admin-bug-with-sections-preview

Conversation

@javihgil

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes an admin bug with section previews by ensuring that site and locale parameters are properly passed through when rendering sections in admin preview mode. The changes handle multiple parameter sources (query parameters and request attributes) and add support for different rendering modes (ESI, AJAX, and standard).

Changes:

  • Added admin preview detection from query parameters in the SectionController
  • Improved site and locale parameter handling with multiple fallback sources
  • Updated Twig template to pass admin preview context and site information through all rendering modes

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/Controller/SectionController.php Added LocaleSwitcher dependency, enhanced admin preview detection from query parameters, improved site/locale parameter resolution with fallbacks
cms/modules/section/render.html.twig Added admin preview detection, updated all three rendering modes (ESI, AJAX, standard) to pass admin preview and site parameters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Controller/SectionController.php Outdated
Comment thread cms/modules/section/render.html.twig
Comment thread src/Controller/SectionController.php Outdated
Comment thread src/Controller/SectionController.php Outdated
evabelpeq
evabelpeq previously approved these changes Feb 25, 2026

Copilot AI commented Feb 25, 2026

Copy link
Copy Markdown

@javihgil I've opened a new pull request, #6, to work on those changes. Once the pull request is ready, I'll request review from you.

@javihgil
javihgil merged commit df1674e into 5.5 Feb 25, 2026
2 of 3 checks passed
@javihgil
javihgil deleted the fix-admin-bug-with-sections-preview branch February 25, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants