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

Set Alchemy::Page.current in Messages Controller #3012

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Sep 3, 2024

What is this pull request for?

Needs #3011

Since Alchemy 7.2 (#2701) we need to set Alchemy::Page.current
if we want to render a page from another controller.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

With Alchemy 7.2 (AlchemyCMS#2701) we started to use `Alchemy::Current.page`
for rendering elements of current page. If one has a custom
controller to render Alchemy content with:

    render(template: "alchemy/pages/show")

it is now empty if `Alchemy::Current.page` is not set.

Someday we might deprecate the `@page` instance variable,
but until then we need to fall back to it.
Since Alchemy 7.2 (AlchemyCMS#2701) we need to set `Alchemy::Page.current`
if we want to render a page from another controller.
@tvdeyen tvdeyen added the backport-to-7.2-stable Needs to be backported to 7.2-stable label Sep 3, 2024
@tvdeyen tvdeyen requested a review from a team as a code owner September 3, 2024 17:13
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.47%. Comparing base (2adf6e2) to head (19b2b34).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3012   +/-   ##
=======================================
  Coverage   96.47%   96.47%           
=======================================
  Files         237      237           
  Lines        6403     6404    +1     
=======================================
+ Hits         6177     6178    +1     
  Misses        226      226           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tvdeyen tvdeyen merged commit a13577a into AlchemyCMS:main Sep 3, 2024
40 checks passed
@tvdeyen tvdeyen deleted the fix-messages-controller branch September 3, 2024 21:15
@tvdeyen
Copy link
Member Author

tvdeyen commented Sep 4, 2024

💚 All backports created successfully

Status Branch Result
7.2-stable

Questions ?

Please refer to the Backport tool documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-7.2-stable Needs to be backported to 7.2-stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants