使用 Drupal 开发的项目迁移的初始化文档

Submitted by dravenk on Tue, 11/07/2017 - 13:20
下载项目文件
git clone git@github.com:dravenk/myweb.git
使用代码安装新的应用
sudo drush si --db-url=mysql://root:rootpass@localhost:3306/db_dbtest --account-pass=Password
删除 shortcut link 数据
drush sqlq 'truncate table shortcut; truncate table shortcut_field_data;'
查看配置文件中的 uuid ,例如 myweb 项目配置目录为 sites/config/sync
cat sites/config/sync/system.site.yml
拷贝 system.site 中的 {uuid} ,更新新应用的 uuid 为旧的配置中的 uuid ,执行
drush cset system.site uuid {uuid}
设置settings.php中的 $config_directories 中的参数与原有配置文件相同路径,例如 myweb 的 settings.php
$config_directories['sync'] = 'sites/config/sync';

The bcmath extension is required by NumberFormatter

Submitted by dravenk on Fri, 07/14/2017 - 08:51
RuntimeException: The bcmath extension is required by NumberFormatter. in CommerceGuys\Intl\Formatter\NumberFormatter->__construct() (line 113 of /var/www/html/vendor/commerceguys/intl/src/Formatter/NumberFormatter.php).

 

docker-php-ext-install bcmath  
docker-php-enable bcmath  

docker-php-ext-enable bcmath

 

Reference:  

https://github.com/kalabox/kalabox/issues/1655 

错误修改 PATH

Submitted by dravenk on Sun, 05/28/2017 - 21:58

在编辑 Linux/MAC 的环境变量($PATH)文件.bash_profile或者.profile
到后导致-bash: ** : command not found
解决办法:
export PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin