【Magento 2学习】

Q:/usr/bin/env: ‘php\r’: No such file or directory
A:输入:set  ff=unix  再输入:wq 保存 

  Q:There are no commands defined in the "setup" namespace.
  A:php bin/magento list

 删除通过docker-compose生成的数据卷:docker-compose down --volumes

  Q:Warning: Invalid argument supplied for foreach() in /var/www/html/vendor/ma gento/module-eav/Model/Config.php on line 341
  A:Two ways to fix this issue.Fixed it by changing the line 96 in this file vendor/magento/module-config/Model/Config/Structure/Converter.php.
    Actual Code: if ($children->length && trim($child->nodeValue, "\n ") === '') {
    Corrected Code: if ($children->length && trim($child->nodeValue, "\n\t ") === '') {
    Check if your XML file has any tab spacing within it. If so, remove the tab spacing and replace them with normal single spaces.

 创建管理员 php bin/magento admin:user:create --admin-user=admin --admin-password=admin123 --admin-firstname=Kayla --admin-lastname=Cheng

 docker-compose安装:
 sudo -i
 curl -L https://github.com/docker/compose/releases/download/1.6.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
 chmod +x /usr/local/bin/docker-compose
 exit
 docker-compose --version

猜你喜欢

转载自www.cnblogs.com/paopaocheng/p/11249179.html