Skip to content

Early return for non-admin areas #5

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

Merged
merged 1 commit into from
Apr 24, 2025
Merged

Conversation

davidtabat
Copy link
Contributor

Plugin is under etc/adminhtml, so it shouldn't get executed in admin area anyway. However in case of area emulation, it might still get called - for such cases this early return should avoid trouble.

Plugin is under etc/adminhtml, so it shouldn't get executed in admin area anyway.
However in case of area emulation, it might still get called - for such cases this early return should avoid trouble.
@davidtabat
Copy link
Contributor Author

subject->getArea() returns code based on the area that u are currently emulating, while interceptor still gets triggered based on actual area.

Copy link
Contributor

@rhoerr rhoerr left a comment

Choose a reason for hiding this comment

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

This looks good to me. This should correct issues where the plugin is forcing the admin theme when emulation has a different scope active. Thank you David.

@rhoerr rhoerr merged commit 7d87e43 into mage-os-lab:main Apr 24, 2025
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.

2 participants