- Pindah ke mode development. Copy file “env” ke “.env”. Kemudian tambah baris:
CI_ENVIRONMENT = development
. - Jika masih belum muncul toolbar, baca ini: The Debug Toolbar is not displayed when your baseURL setting (in app/Config/App.php or app.baseURL in .env) does not match your actual URL. Jadi edit dan sesuaikan dengan URL.
- This fixed it for me:
- Rename env file to .env and open it
- Uncomment line # CI_ENVIRONMENT = production and change to the value to development
- Change the app.baseURL value to your app’s base URL (this seems like the step you missed)
Archive for the ‘Uncategorized’ Category
Menampilkan Flame toolbar di CodeIgniter 4
February 21, 2024Konversi markdown ke HTML
August 21, 2023Mengubah value pada field di Drupal & EntityFieldQuery / EntityQuery
August 19, 2023Kalau mau mencoba mengubah-ubah value didalam content type drupal programmatically menggunakan hook yang menyediakan akses ke $entity atau $node seperti hook_entity_presave (https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21entity.api.php/function/hook_entity_presave/10), bisa membaca referensi ini (
https://drupalbook.org/drupal/9111-working-entity-fields-programmatically). Contoh satu baris nya terdapat pada baris ke-22 pada gambar.
Kalau mau melakukan query ke database via API seperti EntityFieldQuery() di Drupal 7, penggantinya adalah EntityQuery() (https://api.drupal.org/api/drupal/core!lib!Drupal.php/function/Drupal%3A%3AentityQuery) yang lebih simpel daripada pendahulunya. Referensi cara pakai bisa membaca di https://www.sitepoint.com/drupal-8-version-entityfieldquery/. Contoh penggunaan pada gambar bisa dilihat pada baris ke 14-19.
Catatan: harusnya semua bisa diterapkan untuk Drupal 8, 9, 10. tapi saya mencobanya di D9.
Bermain main dengan API Entity di Drupal
July 28, 2023Mendapatkan url path di Drupal 9
July 27, 2023
$current_path = \Drupal::service('path.current')->getPath();
Ref: https://stefvanlooveren.me/blog/get-current-url-path-alias-drupal-8-9
Melemparkan error 404 page not found di Drupal 9
July 27, 2023throw new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException();
Ref: https://stackoverflow.com/questions/11152227/how-to-throw-404-error-in-drupal-module
Mendapatkan informasi logged-in user di Drupal 9
July 27, 2023Mendapatkan informasi logged-in user di Drupal 9: https://drupal.stackexchange.com/questions/184498/how-do-i-get-the-user-id-for-the-currently-logged-in-user
Trouble shooting error instalasi driver sqlsrv di PHP 8.1 Ubuntu 22.04
May 16, 2023Saya mencoba install driver sqlsrv di PHP 8.1 pada Ubuntu 22.04. Panduan instalasi dari https://learn.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-ver16.
Saat langkah tahap “sudo pecl install sqlsrv”, terjadi error yang kira-kira seperti ini pesannya:
tmp/pear/temp/sqlsrv/shared/xplat.h:30:10: fatal error: sql.h: No such file or directory
Setelah googling dan membaca ini https://stackoverflow.com/questions/44153407/error-1-error-make-failed-when-installing-sqlsrv, ternyata dibutuhkan satu langkah lagi sebelumnya, yaitu instalasi header sql pada unix yang terdapat di paket unixobdc-dev, maka, jalankan:
sudo apt install unixodbc-dev
Setelah itu ulangi lagi langkah: “sudo pecl install sqlsrv”.
Selamat mencoba!
Modul CSHS di Drupal 10 pada PHP 8.1
May 15, 2023Sampai saat tulisan ini dibuat, modul Client-side Hierarchical Select untuk Drupal 10 (saya menginstallnya dengan menjalankan: composer require 'drupal/cshs:^4.0'
), ternyata masih buggy. Fitur tidak jalan sama sekali. Coba googling nemu isu ini di: https://www.drupal.org/project/cshs/issues/3347581.
Sudah ada solusi dari salah satu user, dari satu bulan yang lalu, yaitu: https://git.drupalcode.org/project/cshs/-/commit/db3155a9f9379e428bcc4387844567acaf016a32. Sudah juga dilakukan pull request tapi tampaknya code developer modul tersebut masih sangat sibuk hingga bugs kritical kaya gini masih didiemin.
Yang kemudian saya lakukan, copas update pada 3 file seperti dijelaskan pada link sebelum ini:
- build/cshs.js
- build/cshs.js.map
- frontend/src/cshs.ts
Problem solved. Selamat mencoba.