You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the site select to switch back to the original default site
Note that the page shown is from the new site/language, not the default site. You can confirm by looking at it's ID when hovering over the page link, or clicking in to edit the page and noting the site/language displayed in its tab.
Expected behavior
When using the site select to switch back to the default site, it should show that site's pages.
Actual behavior
It's stuck on the new site/language's pages. It looks like this is because Alchemy::Admin::CurrentLanguage.load_current_language is using the language ID stored in session, which is only changed by the Languages#switch action, which only happens when switching a language, not when switching sites. My best crack at a fix would be adding a check in Alchemy::Admin::CurrentLanguage.load_current_language for whether session[:alchemy_language_id] is an ID of the site indicated by the site_id parameter, and if not, set it to the site's default language. I'll probably take a stab at this if someone else doesn't get to it before me, but I wanted to report the bug first.
System configuration
Alchemy Version: Tested on main and 7.1
Rails Version: 7.1.3.1
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Expected behavior
When using the site select to switch back to the default site, it should show that site's pages.
Actual behavior
It's stuck on the new site/language's pages. It looks like this is because
Alchemy::Admin::CurrentLanguage.load_current_language
is using the language ID stored in session, which is only changed by theLanguages#switch
action, which only happens when switching a language, not when switching sites. My best crack at a fix would be adding a check inAlchemy::Admin::CurrentLanguage.load_current_language
for whethersession[:alchemy_language_id]
is an ID of the site indicated by thesite_id
parameter, and if not, set it to the site's default language. I'll probably take a stab at this if someone else doesn't get to it before me, but I wanted to report the bug first.System configuration
main
and 7.1The text was updated successfully, but these errors were encountered: