Zum Inhalt springen

Drush: Unterschied zwischen den Versionen

Aus Computech CMS Wiki
Simon Zeberli (Diskussion | Beiträge)
Zeile 1: Zeile 1:
=Drush befehle=
=Drush befehle=
==Boolean==
==Boolean==
<code>drush cset webform.settings third_party_settings.antibot.antibot true --input-format=yaml</code>
Core:
* One Time Login Link: <code>drush uli</code>
* One Time Login Link für einen Bestimmten user: <code>drush uli --uid=10</code>
Views:
* Erweitert Gruppe standartmässig öffnen. <code>drush cset views.settings ui.show.advanced_column true --input-format=yaml</code>
Antibot:
* <code>drush cset webform.settings third_party_settings.antibot.antibot true --input-format=yaml</code>
Stage File Proxy
* <syntaxhighlight line='line' lang="bash">
drush config:set stage_file_proxy.settings origin "https://ballon-zeberli.ch"
drush config:set stage_file_proxy.settings hotlink 1
</syntaxhighlight >


==Entitiy Delete (Paragraph_types / Node_types etc)==
==Entitiy Delete (Paragraph_types / Node_types etc)==

Version vom 16. März 2022, 11:24 Uhr

Drush befehle

Boolean

Core:

  • One Time Login Link: drush uli
  • One Time Login Link für einen Bestimmten user: drush uli --uid=10

Views:

  • Erweitert Gruppe standartmässig öffnen. drush cset views.settings ui.show.advanced_column true --input-format=yaml

Antibot:

  • drush cset webform.settings third_party_settings.antibot.antibot true --input-format=yaml

Stage File Proxy

  • drush config:set stage_file_proxy.settings origin "https://ballon-zeberli.ch"
    drush config:set stage_file_proxy.settings hotlink 1
    

Entitiy Delete (Paragraph_types / Node_types etc)

drush entity:delete paragraphs_type -> Paragraphs Type

drush entity:delete node_type -> Node Type


Drush arbeitet sehr eng mit Git zusammen

Drush Befehle

Befehl Beispiel Bemerkungen
drush dl drush dl drupal Core Herunterladen
drush dl Module --dev drush dl admin_toolbar --dev Module DEV Branch Herunterladen
drush dl Module --select drush dl admin_toolbar --select Module Version auswählen
drush up drush up module Modulee Updaten
drush watchdog-show drush watchdog-show Logs auslesen

Wo ist Drush installiert?

which drush

Drush Upgrade

DAN cd /usr/local/bin php -r "readfile('https://s3.amazonaws.com/files.drush.org/drush.phar');" > drush chmod +x drush


composer require "drush/drush:8.*" Anleitung unter: https://www.lullabot.com/articles/switching-drush-versions

Drush Kommandos

Drush beispiele / Anwendungen

Drush Aliases

Installation

Ubuntu mit Sudo Rechte

sudo apt-get install drush

Installation ubuntu

https://www.drupal.org/node/1248790 pear channel-discover pear.drush.org pear install drush/drush drush version

Drush installation unter Cyon

Drush unter cyon installieren

Drush Upgrade

export PATH="$HOME/.composer/vendor/bin:$PATH"

composer global require drush/drush:7.*

Drush Fehlermeldung im Zusammenhang mit Commerce

Wenn unter Durpal 7 Drupal Commerce im Einsatz ist, kann unter Umständen drush nicht mehr gestartet werden.

Folgende Codeänderungen sind dann notwendig:

 --- commerce/modules/cart/commerce_cart.module	(revision )
 +++ commerce/modules/cart/commerce_cart.module	(revision )
 @@ -1339,7 +1339,8 @@
 
      // Allow other modules to specify what properties should be compared when
      // determining whether or not to combine line items.
 -    drupal_alter('commerce_cart_product_comparison_properties', $comparison_properties, clone($line_item));
 +    $line_item_clone = clone($line_item);
 +    drupal_alter('commerce_cart_product_comparison_properties', $comparison_properties, $line_item_clone);

      // Loop over each line item on the order.
      foreach ($order_wrapper->commerce_line_items as $delta => $matching_line_item_wrapper) {

Patch:

 https://www.drupal.org/files/issues/commerce-cart_product_add_php7-2762907-5.patch

Drush Install auf Hostpoint

curl -sS https://getcomposer.org/installer | php

Bash Profile anpassen vim .bash_profile

Pfad von Composer einfügen: alias composer="php ~/composer.phar"

Jetzt die Bash Profile neu laden: source .bash_profile

Danach mit composer drush installieren composer global require drush/drush:8.* oder:

composer global require drush/drush:dev-master

Pfad von drush einfügen: vim .bash_profile

alias drush="~/.composer/vendor/drush/drush/drush"

BUGS

PHP Version ändern: auf PHP CLI 7.1 count(): Parameter must be an array or an object that implements Countable Table.php:789 [warning]

sudo update-alternatives --set php /usr/bin/php7.1