Command Line PHP
sudo update-alternatives --config php
Select php8.0 from the list with the available options:
Command Line PHP
sudo update-alternatives --config php
Select php8.0 from the list with the available options:
Use "drush" fix error "Can't install module because configuration already exists in active configurations."
drush ev "\Drupal::service('config.manager')->uninstall('module', 'MODULE_NAME');"
ตัวอย่างใน composer.json
ปัญหาการใช้งาน composer แล้วเกิด error ไม่สามารถลบไฟล์ default.services.yml ได้
[RuntimeException]
Could not delete /web/sites/default/defaul
t.services.yml:
วิธีแก้ไข
chmod u+w web/sites/default
สำหรับ Global
git config --global user.name "Your global username"
git config --global user.email "[email protected]"
ตรวจสอบค่า config
git config --global --get user.name
git config --global --get user.email
สำหรับ Project
Note
tar -zcvf name-folder-giz.tar.gz folder-name/
โดยใช้คำสั่ง
sudo update-alternatives --set php /usr/bin/php7.3
และลองเช็คดูว่าเปลี่ยน php เวอร์ชั่นหรือเปล่า โดยใช้คำสั่ง
php -v
การเปลี่ยน php เวอร์ชั่น ใช้ตอนที่เรามีปัญหากับการใช้ drush ไม่ได้ และ composer
Update แบบ fix field นั้นๆ ว่าจะเป็นค่าอะไร
mytheme.libraries.yml:
jquery-custom:
remote: https://github.com/jquery/jquery
version: "2.2.4"
license:
name: MIT
url: https://github.com/jquery/jquery/blob/2.2.4/LICENSE.txt
gpl-compatible: true
js:
js/jquery-2.2.4.min.js: { minified: true, weight: -20 }
mytheme.info.yml:
libraries-override:
# Replace an entire library.
core/jquery: mytheme/jquery-custom
ปัญหาการอัพไฟล์
ถ้าใช้ โมดูล jquery_update 7.x.27 ให้อัพเดทไปเป็น 7.x-3.0-alpha5
แล้วเปลี่ยนใช้ jquery version 1.12 หรือ 2.1 สำหรับ admin theme