Migrate |
9.x |
drush config |
Upgrade source(環境) を 変更したときにやるべきこと |
アップデート |
8.9.x |
Composer update |
composer update するときに パッチが必要なモジュールが更新されパッチが消えてしまうことへ対応する方法 |
サイト情報 |
8.9.x |
api |
Drupal::request() メモ |
フォーム |
8.9.x |
api |
GET/POSTされた情報を得る方法 |
コンテンツの管理 |
8.9.x |
|
写真の変更を行いたい |
フォーム |
8.9.x |
Views |
Views exposed filterのフォームに#default_valueを仕込む方法 |
コンテンツの管理 |
8.9.x |
Dialog Modal Canvas |
drupal 8 の標準機能のダイアログ/ポップアップを表示する方法 |
PHP-FPM |
8.9.x |
PHP |
PHP-FPM 環境で .htaccess に php_value を 書いてもダメ |
コンテンツの作成 |
8.9.x |
CKEditor |
CKEditor編集中の見た目をフロントと全く同様にする方法 |
コンテンツの作成 |
8.9.x |
node |
ノード保存時の前回値の参照方法 |
PHP |
8.9.x |
PHP |
YamlをPHP配列にする方法 |
SESSION |
8.9.x |
api |
$_SESION操作のAPI |
サイトの環境設定 |
8.9.x |
|
編集 |
コンテンツの作成 |
8.9.x |
vim nkf |
ファイルのエンコーディングを確認、変更する方法 |
PHP |
8.9.x |
drush |
drush sql:cli < が機能しない場合の対処 |
アップデート |
8.9.x |
composer patch |
patch を composer に 組み込む方法 |
アップデート |
8.9.x |
Composer update |
Composer で drupal/core-8.9.7 に更新できなくなった場合の処置 |
コンテンツの作成 |
8.9.x |
CSS |
キャプション付きの(右寄/左寄)画像を画像サイズを基準にきれいに表示する方法 |
リバースプロキシ |
8.9.x |
mod_proxy mod_proxy_http mod_ssl |
Apache2.4 から httpsサーバーへリバースプロキシする方法 |
アップデート |
8.9.x |
PHP |
CentosでPHPのバージョンアップ(例:5.3->5.6)を行う方法 |
コメント
■ settings.local.phpを作成する
パーマリンク Submitted by actbrain on 2017/10/20 01:52.
■ settings.local.phpを作成する
$ cd /path/to/document-root/sites/default
$ cp ../example.settings.local.php settings.local.php
■ settings.local.php から development.service.yml を読み込むようにする
$ cd /path/to/document-root/sites/default
$ vim settings.local.php
$ diff -upN ../example.settings.local.php settings.local.php
〜
-# $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
+$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
〜
-# $settings['cache']['bins']['render'] = 'cache.backend.null';
+$settings['cache']['bins']['render'] = 'cache.backend.null';
〜
-# $settings['cache']['bins']['discovery_migration'] = 'cache.backend.memory';
+$settings['cache']['bins']['discovery_migration'] = 'cache.backend.memory';
〜
+$settings['file_private_path'] = '/path/to/private'; // ついでにプライベートディレクトリを定義する
■ development.service.yml にデバッグ用設定を追加する
$ cd /path/to/document-root/sites/default
$ vim ../development.services.yml
〜以下の行を追加する
parameters:
http.response.debug_cacheability_headers: true
twig.config:
debug: true
auto_reload: true
cache: false
〜
■ settings.php から settings.local.php を読み込むようにする
$ cd /path/to/document-root/sites/default
$ vim setting.php
$ diff -upN default.settings.php settings.php
〜
-# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
-# include $app_root . '/' . $site_path . '/settings.local.php';
-# }
+if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
+ include $app_root . '/' . $site_path . '/settings.local.php';
+}
〜
■ Cacheをクリアする
$ drush cr
ページ