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

Bug when domains mismatch #1227

Closed
SchumacherFM opened this issue May 4, 2015 · 1 comment
Closed

Bug when domains mismatch #1227

SchumacherFM opened this issue May 4, 2015 · 1 comment

Comments

@SchumacherFM
Copy link
Member

Latest commit from develop branch on OSX 10.9 with Apache 2.2 and PHP 5.5 with OPCache:

Following condition: core_config_data with scope default, path web/unsecure/base_url and value http://mage2.dev/.

Webserver is configured with domain http://magento2.local/. Calling http://magento2.local/ via a browser results in:

( ! ) Fatal error: Call to a member function getFieldValue() on a non-object in magento2/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php on line 93

Fixing this gives me:

( ! ) Fatal error: Call to a member function getFieldValue() on a non-object in magento2/lib/internal/Magento/Framework/App/PageCache/Kernel.php on line 65

After short research: getHeaders method returns false if value is non-existent ...

Suggestion: Return an empty HeaderInterface which catches the calls in the two above locations alternatively check for false in the two above mentioned locations.

With this fix Magento2 tries to redirect to the domain stored in the core_config_data table.

Of course better would be a domain mismatch error instead of silently redirecting to the configured domain. People perhaps won't notice and start editing on their production store but thinking they are on their local development machine 😂.

@mazhalai
Copy link
Contributor

mazhalai commented May 4, 2015

@SchumacherFM Thank you for reporting this issue. This has been fixed internally and should be available soon. Also, closing this in favor of #1212, which is a duplicate.

@mazhalai mazhalai closed this as completed May 4, 2015
magento-team pushed a commit that referenced this issue Jun 26, 2017
[okapis] MAGETWO-69629: Deadlock Error While indexing Category products
dmanners pushed a commit to dmanners/magento2 that referenced this issue Dec 19, 2017
[okapis] MAGETWO-69629: Deadlock Error While indexing Category products
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

No branches or pull requests

2 participants