Direkt zum Inhalt
Startseite

Main navigation

  • Startseite
  • Neue Frage stellen!
User account menu
  • Anmelden

Pfadnavigation

  1. Startseite

Drupal

By Gast (nicht überprüft), 7 Juni, 2022

Taxonomy Term : create programmatically (Drupal)

Create Taxonomy Term (in Vocabulary): 

use Drupal\taxonomy\Entity\Term;

$new_term = Term::create([
  'vid' => 'name_of_the_vocabulary',
  'name' => 'name of the term',
]);

$new_term->enforceIsNew();
$new_term->save();

 

By Gast (nicht überprüft), 25 Mai, 2022

Drupal 9.3.14, gibt es diese Version wirklich ? Composer : JA, Drupal.org: NEIN !

Laut Composer gibt es 8 Updates, darunter Drupal Core 9.3.14 :

 

 0 installs, 8 updates, 0 removals
  - Upgrading doctrine/cache (1.12.1 => 1.13.0)
  - Upgrading drupal/core (9.3.13 => 9.3.14)
  - Upgrading drupal/core-composer-scaffold (9.3.13 => 9.3.14)
  - Upgrading drupal/core-project-message (9.3.13 => 9.3.14)
  - Upgrading drupal/core-recommended (9.3.13 => 9.3.14)
  - Upgrading drupal/embed (1.4.0 => 1.5.0)
  - Upgrading guzzlehttp/guzzle (6.5.5 => 6.5.6)
  - Upgrading maennchen/zipstream-php (2.1.0 => 2.2.1)

 

By Gast (nicht überprüft), 19 Mai, 2021

"At least one authentication provider must be defined for resource entity.node" : Drupal Error

Drupal 8 (letzte Version) zeigt immer diese Fehlermeldung, wenn ich Module aktualisieren möchte (zB mit Drush). Unabhängig davon sehe ich diese Meldungen ab und zu in Logs.

# drush ws :

By Gast (nicht überprüft), 4 Mai, 2021

Drupal Views : Header/Footer verstecken, wenn View leer ist

Obwohl man in Views,  Blocks und auch in Anzeigen es markiert hat, wird das View trotzdem oft dargestellt bzw. Header / Footer bleiben sichtbar.

Lösung:

Gleiches Feld in Filter auswählen (if not empty) 

 

By Gast (nicht überprüft), 8 Februar, 2021

Drupal 8/9 - current_uri , current_path, Alias mit/ohne Language Code

Current Url



$current_url = Url::fromRoute('<current>');
$path = $current_url->toString();



 

Current Url : Internal Path / Route Name




$current_url->toString();    # /en/user/login
$current_url->getInternalPath();    # user/login
$path = $current_url->getRouteName();   # <current>


 

System Path



$path = \Drupal::request()->attributes->get('_system_path');

 

By Gast (nicht überprüft), 20 Januar, 2021

Drupal (Auto) Update mit Shell Script & Cronjobs

  1. Create : drupal_backup_update.sh
     
  2. Cronjob (Drupal Update every day at 03:15):
    15 3 * * * /path/to/drupal_backup_update.sh
  3. chmod +x drupal_backup_update.sh

 

By Gast (nicht überprüft), 16 November, 2020

Drush Cron für nur ein (Drupal) Modul

So geht es:

drush php-eval 'my_custom_module_cron();'

 

By Gast (nicht überprüft), 20 August, 2020

Drupal 8 - Controller mit inline Template (Twig, HTML | raw)

Controller könnte so aussehen:

By Gast (nicht überprüft), 8 Juli, 2020

"Attempting to re-run cron while it is already running." : Drupal 8.9 Cron Problem

Message:

EN: Attempting to re-run cron while it is already running.

DE: Versuche Cron erneut auszuführen, obwohl er bereits ausgeführt wird.

How fo fix it?

Was ist die Lösung?

 

 

By Gast (nicht überprüft), 19 Juni, 2020

Drupal Forward Module durch (Re)Captcha schützen - sonst Spam ohne Ende über "forward-form-node-123" oder "forward-form-comment-123"

Drupal's Forward Module hat ein Nachteil: jedes Form hat eine numerische eindeutige ID, was unmöglich macht Formulare mit Captcha / Recaptcha zu schützen.

 

zB:

  •  forward-form-node-12345 (statt  forward-form-node)
  •  forward-form-comment-12345  (statt  forward-form-comment)

Deswegen ist ein Patch nötig.

Die Lösung

File:Line
modules\contrib\forward\src\Form\ForwardForm.php:187

 

Seitennummerierung

  • Vorherige Seite
  • 2
  • Nächste Seite
Drupal

Neueste Kommentare

  • Die Lösung ist:

    # export…

    4 Monate ago
    Composer plugins have been disabled for safety in this non-interactive session. Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
    Read more
  • IT ist Grundlage der EDV

    3 Monate ago
    Gibts Unterschied zwischen EDV und IT?
    Read more
  • Bluetooth erkennt Gerät (Hörgeräte) nicht

    3 Monate ago
    Bestes Computer Forum mit oder ohne Registrierung
    Read more
  • DB Export als .zip …

    9 Monate 1 Woche ago
    Mysqldump - Backup Database to .gz with Date / TimeStamp
    Read more
  • Notice: Undefined index: limit in Drupal\views\Plugin\views\disp

    10 Monate 3 Wochen ago
    Notice: Trying to access array offset on value of type null in Drupal\views\Plugin\views\display\EntityReference->query() (Zeile 195 in ... EntityReference.php)
    Read more
  • Scaner auf Laptop einrichten

    11 Monate 3 Wochen ago
    Computer Forum ohne Anmeldung
    Read more
  • Cronjobs

    1 Jahr ago
    rsynch & ssh : Upload (Files & Directories) to Remote Server
    Read more
  • Remote Upload & Sync …

    1 Jahr ago
    rsynch & ssh : Upload (Files & Directories) to Remote Server
    Read more
  •   rsync + Password

    1 Jahr ago
    rsynch & ssh : Upload (Files & Directories) to Remote Server
    Read more
  • Web3 ist Dezentrales…

    1 Jahr 4 Monate ago
    Was ist Web3?
    Read more
Die E-Mail Adresse, die den Newsletter erhalten soll.
You are already subscribed
Manage existing

Tools

  • Cookie settings
  • Inhalt hinzufügen
  • Neuester Inhalt
RSS feed

Fußbereich

  • Allgemeine Geschäftsbedingungen - Datenschutz - Impressum
x
x