Difference between revisions of "Drupal"
From Wasya Wiki
(→Disable caching) |
|||
(45 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
composer create-project drupal/recommended-project:9.5.10 html | composer create-project drupal/recommended-project:9.5.10 html | ||
− | |||
composer require 'drupal/devel:^5.1' | composer require 'drupal/devel:^5.1' | ||
composer require 'drupal/s3fs:^3.3' | 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' | ||
+ | |||
+ | |||
+ | |||
+ | == drush == | ||
+ | ./vendor/bin/drush --version | ||
+ | ./vendor/bin/drush cache:clear | ||
== Configure Apache == | == Configure Apache == | ||
Line 72: | Line 95: | ||
class: Drupal\Core\Cache\NullBackendFactory | class: Drupal\Core\Cache\NullBackendFactory | ||
</pre> | </pre> | ||
+ | |||
+ | == ReST == | ||
+ | <pre> | ||
+ | |||
+ | |||
+ | 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" }] } | ||
+ | ] | ||
+ | } | ||
+ | |||
+ | }' | ||
+ | </pre> | ||
+ | |||
+ | == trash == | ||
+ | composer require 'drupal/file_entity:^2.0@RC' | ||
+ | composer require 'drupal/file_entity:2.x-dev@dev' | ||
+ | composer self-update --1 | ||
+ | composer require drupal/core-recommended:8.8.2 drupal/core-composer-scaffold:8.8.2 drupal/core-project-message:8.8.2 --update-with-all-dependencies | ||
+ | composer require 'drupal/formblock:^2.0@beta' |
Revision as of 15:27, 26 April 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'
drush
./vendor/bin/drush --version ./vendor/bin/drush cache:clear
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>/*" ] } ] }
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" }] } ] } }'
trash
composer require 'drupal/file_entity:^2.0@RC' composer require 'drupal/file_entity:2.x-dev@dev' composer self-update --1 composer require drupal/core-recommended:8.8.2 drupal/core-composer-scaffold:8.8.2 drupal/core-project-message:8.8.2 --update-with-all-dependencies composer require 'drupal/formblock:^2.0@beta'