PHP DOMDocument UTF-8 data into ISO-8859-1 document snippets

Encoding is hard in many cases. Today I ran into one, where we had to save UTF-8 data (from a Drupal website) into an XML document which requires ISO-8859-1 encoding.

We're using for that, which seems to have some problems / flaws with such cases, as the following issues show:

Run Jira Server on Hetzner Managed vServer


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.



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

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

Or to only use HEAD:
* * * * * /usr/bin/wget wget --spider -qO /dev/null

For further details see


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: