Difference between revisions of "Drupal"
From Wasya Wiki
(→Develop) |
|||
Line 33: | Line 33: | ||
composer require 'drupal/metatag:^2.0' | composer require 'drupal/metatag:^2.0' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Configure Apache == | == Configure Apache == | ||
Line 92: | Line 84: | ||
* various dumpers like dpm: https://www.drupal.org/project/vardumper | * various dumpers like dpm: https://www.drupal.org/project/vardumper | ||
+ | |||
+ | == use drush == | ||
+ | |||
+ | ./vendor/bin/drush --version | ||
+ | ./vendor/bin/drush cache:clear | ||
+ | ./vendor/bin/drush updatedb:status -vvv | ||
== Disable caching == | == Disable caching == |
Revision as of 16:16, 9 September 2024
Contents
Install & Configure
composer create-project drupal/recommended-project:9.5.10 html
composer require 'drupal/devel:^5.1' composer require 'drupal/s3fs:^3.3' # composer require 'wasya-co/consent_popup: 1.0.4.x-dev' composer require 'drupal/consent_popup:^1.0' composer require 'drush/drush:^11.6' composer require 'drupal/metatag:^2.0' composer require 'drupal/redirect:^1.9' composer require 'drupal/superfish:^1.6' composer require 'drupal/webform:^6.0' composer require 'drupal/captcha:^1.14' composer require 'drupal/typed_data:^1.0@alpha' composer require 'drupal/rules:^3.0@alpha' composer require 'drupal/smtp:^1.2' composer require 'drupal/hal:^1.0' composer require 'drupal/restui:^1.21' composer require 'drupal/keycloak:^2.2@beta' composer require 'drupal/nodeaccess:^2.0@alpha' composer require 'drupal/backup_migrate:^5.0' composer require 'drupal/email_registration:^2.0@RC' composer require 'drupal/content_access:^2.0' composer require 'drupal/social_media:^2.0' composer require 'drupal/wordpress_migrate:^3.0@alpha' composer require 'drupal/migrate_tools:^6.0' composer require 'drupal/codefilter:^2.0' composer require 'drupal/views_taxonomy_term_name_depth:^7.2' composer require 'drupal/calendar_view:^2.1' composer require 'drupal/pathauto:^1.12' composer require 'drupal/metatag:^2.0'
Configure Apache
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
Configure s3fs
{ "Version": "2012-10-17", "Statement": [ { "Sid": "Statement0", "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:ListBucketVersions" ], "Resource": [ "arn:aws:s3:::<ze bucket>" ] }, { "Sid": "Statement1", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObjectVersion", "s3:DeleteObject", "s3:GetObjectVersion", "s3:GetObjectAcl", "s3:PutObjectAcl" ], "Resource": [ "arn:aws:s3:::<ze bucket>/*" ] } ] }
Develop
- various dumpers like dpm: https://www.drupal.org/project/vardumper
use drush
./vendor/bin/drush --version ./vendor/bin/drush cache:clear ./vendor/bin/drush updatedb:status -vvv
Disable caching
From: https://www.drupal.org/docs/develop/development-tools/disable-caching
- Add the settings.local.php and
- Modify development.services.yml:
parameters: http.response.debug_cacheability_headers: true twig.config: debug: true auto_reload: true cache: false services: cache.backend.null: class: Drupal\Core\Cache\NullBackendFactory
ReST
curl --include \ --request POST \ --user admin:<> \ --header 'Content-type: application/hal+json' \ http://pi.local/node?_format=hal_json \ --data-binary '{ "_links": { "type":{"href":"http://pi.local/rest/type/node/article"} }, "title":[{"value":"Node +++ 123 bac +++" }], "body":[{"value": "<b>hello, wor</b>ld!", "format": "full_html" }], "type":[{"target_id":"article"}], "status": [{"value": 1}], "_embedded": { "http://pi.local/rest/relation/node/article/field_issue": [ { "uuid": [{ "value": "56229a95-d675-43e1-99b1-f9e11b5579c5" }] } ], "http://pi.local/rest/relation/node/article/field_tags": [ { "uuid": [{ "value": "45646a7d-1a16-42e8-b758-f6e1c8d976f7" }] }, { "uuid": [{ "value": "834e34e2-05ae-498d-b876-453798872ce1" }] } ] } }'