magento2: M2.2.1 Unable to open Address book after account creation
Preconditions
- Magento version 2.2.1
- PHP version 7.0.7
Steps to reproduce
- Set up a Magento v2.2.1 environment.
- Create an account as a customer.
- Immediately after creating your customer, try to open your address book.
Expected result
- Your address book opens up, where you can insert your address details.
Actual result
A 500 error pops up in my screen.
The following logs are generated:
2017/11/10 17:12:21 [error] 2807#2807: *27047 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot use Magento\Framework\App\Helper\Context as Context because the name is already in use in /public/vendor/magento/module-customer/Model/AttributeChecker.php on line 11" while reading response header from upstream, client: 81.30.47.209, server: example.com, request: "GET /customer/address/new/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7-fpm.sock:", host: "example.com"
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (11 by maintainers)
@EliasKotlyar: Do you run PHP 7.0.12 or lower? There was a bug in those versions which is very similar to what you explain here, and this was fixed in PHP 7.0.13: https://bugs.php.net/bug.php?id=66862 & http://php.net/ChangeLog-7.php#7.0.13
Magento is requiring minimum PHP 7.0.13 since this commit: https://github.com/magento/magento2/commit/55657e12abfe3681022ed1e545cbdbb01cba712a (although this commit is not yet released in an official new Magento version)
Got The Error while installing in Xampp “PHP Fatal error: Cannot use Magento\Payment\Gateway\ConfigInterface as ConfigInterface because the name is already in use in C:\xampp\htdocs\dreamkart\vendor\magento\module-payment\Model\Method\Logger.php on line 8”
Hi @tig-dennisvanderhammen The issue has been fixed and delivered in 2.2-develop branch. Will be available with upcoming patch release.
I was able to reproduce this error with the same steps as above in 2.2.1.
Site was running in production mode and I had run
composer dump-autoload -o. The issue is related to an unnecessary use operator in a Customer module Model.PR added here: https://github.com/magento/magento2/pull/12220