• 【Magento 2学习】


    1.

    Q:/usr/bin/env: ‘php ’: 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

    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, " ") === '') { Corrected Code: if ($children->length && trim($child->nodeValue, " ") === '') { Check if your XML file has any tab spacing within it. If so, remove the tab spacing and replace them with normal single spaces.

    2.

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

    创建管理员 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

    常用命令:
    php bin/magento setup:static-content:deploy -f 编译静态资源
    php bin/magento indexer:reindex     刷新索引
    php bin/magento setup:upgrade  更新数据
    php bin/magento moudule:enable Test_Hello(module的名称)  启用此module
    php bin/magento setup:db-schema:upgrade
    php bin/magento setup:db-data:upgrade
    php bin/magento deploy:mode:set production/developer/default
     1.遇到的问题
    
    - Installing magento/framework (102.0.2): Downloading 
    
    [ComposerDownloaderTransportException] 
    The 'https://repo.magento.com/archives/magento/framework/magento-framework-102.0.2.0.zip' URL could not be accessed: HTTP/1.1 403 Forbidden
    
    解决办法:$find / -name auth.json 
    
        $sudo vi /home/vagrant/.config/composer/auth.json
    
    {
        "http-basic": {
            "repo.magento.com": {
                "username": "xxx正确的usernamexxx",
                "password": "xxx正确的passwordxxx"
            }
        }
    }            
    

      

  • 相关阅读:
    快速复习正则表达式
    常用正则表达式
    用SqlConnectionStringBuilder修改连接超时时间
    GRUB 启动 WIN PE 镜像(ISO)
    win xp 关闭动画屏幕角色,那只小狗
    win xp firefox,chrome 在浏览网页时字体发虚,可以设置为新宋体
    OpenFileDialog 打开快捷方式时,返回的是快捷方式引用的路径,而不是快捷方式(.lnk)自身的路径
    关闭IE 对剪切板访问的提示
    svn 提交代码 自动过滤技巧,自动过滤不想提交的文件和文件夹
    WinForm 打开文件夹
  • 原文地址:https://www.cnblogs.com/paopaocheng/p/11249179.html
Copyright © 2020-2023  润新知