Snippet

Run Jira Server on Hetzner Managed vServer

Szenario

Wir wollen testen, ob das beliebte Atlassian Jira auch auf einem Hetzner Managed Server betrieben werden kann.
Um das Leistungs-Minimum zu testen, haben wir uns für einen VSERVER MC40 entschieden.

Vorarbeiten

Einordnung:

Drupal 8: Add menu item with anchor link programmatically in .menu.yml

For a Drupal 8 EU Cookie Compliance patch I needed a way to add an anchor link as default menu item programmatically in .menu.yml


example.anchor:
title: "Anchor example"
description: "Scroll to top on the current page"
url: "internal:#top"

Shopware 5 - defekte Varianten entfernen

Es kann in Shopware 5 aufgrund fehlender Validierung im Import / Export passieren, dass "defekte" Varianten angelegt werden. Also Varianten, denen die korrekte Zuordnung zu ihrem Elternartikel fehlt.

Drupal 8: Add field validation constraint programmatically

In foundation_anchor_menu_block module I needed to add a validation to a field in a block to ensure the entered value matches the regex allowed for an "id" HTML element attribute.

Drupal 8: Delete view programmatically

If you should run into the same situation, that you'd like to delete a view programmatically, for example on module uninstall, here you go:

  1. \Drupal::service('config.factory')->getEditable('views.view.' . $view_name)->delete();

Using wget for Cronjob without output

Short snippet to use for a cronjob to call a url if you don't want any output:

* * * * * /usr/bin/wget wget -qO /dev/null https://www.example.com/your-script-to-run

Or to only use HEAD:
* * * * * /usr/bin/wget wget --spider -qO /dev/null https://www.example.com/your-script-to-run

For further details see https://www.gnu.org/software/wget/manual/wget.html

Einordnung:

Download PDFs in Cordova InAppBrowser (3.1.0)

I wasted several hours on handling PDF downloads in cordovas inAppBrowser.

My situation was that a page was loaded in inAppBrowser which contained links to PDF Downloads from the same host.
The links simply didn't work.

JTL-Shop 4 "keinBild.gif" Platzhalter Grafik updatesicher ersetzen / überschreiben

Heute ein kleiner Tipp für JTL-Shop Entwickler: Wenn ihr die Platzhalter-Grafik für "Kein Bild vorhanden", z.B. für Kategorien, Produktbilder o.Ä. kundenspezfisch und updatesicher durch Grafiken aus Eurem JTL-Shop Template ersetzen möchtet, könnt ihr dies durch folgende Einträge in der Konfiguration erzielen (Beispiel):

Drupal 8 print current breadcrumb trail with route title

Whao, that wasn't as easy as I thought. I wanted to print out the two top level breadcrumb elements, without "Home", with node title in a custom block. I tried it in many different ways but ran into surprises every time. So finally I'd like to share my code with you, if you should run into the same situation:

Drupal CMS: Change user profile title & tab title

Since I needed some time to find out how to change the user profile tabs title and page title, I'd like to share that information with you.