Find files which starts with empty lines or whitespaces / WordPress empty lines in source / MailPoet Captcha not working / Linux Cli

| | Allgemein

I had the Problem that the MailPoet Captcha was not working any more. Quick research lead me to the fact that this comes from whitespaces or empty lines before <?php tags.

I have searched them on the console with this command:

find . -type f -exec perl -0777 -ne ‚print „$ARGV\n“ if /^(\W)+<\?php/‘ {} +

Mostly these are located in functions.php of the template or in plugins, in my case it was a WP_CLI Command.

Dateien mit Leerzeichen oder Umbrüchen in den ersten Zeilen finden / Linux Konsole

Ich hatte das Problem, dass das MailPoet Captcha nicht mehr funktionierte. Eine schnelle Recherche führte mich zu der Tatsache, dass dies von Leerzeichen oder Leerzeilen vor <?php Tags kommt.

Ich habe sie in der Konsole mit diesem Befehl gesucht:

find . -type f -exec perl -0777 -ne ‚print „$ARGV\n“ if /^(\W)+<\?php/‘ {} +

Meistens befinden sich diese in functions.php des Templates oder in Plugins – in meinem Falle war es in einer Datei mit einem WP_CLI Command.

Neueste Beiträge

Introducing a simple Docker Compose setup for HMS MQTT Publisher

I’ve been tinkering with my home automation setup recently, specifically integrating HMS-XXXXW-2T series micro-inverters with my system. The hms-mqtt-publisher[GitHub, External] is a neat tool that does just that by fetching telemetry info from these inverters and publishing it to an MQTT broker. The catch? It typically requires compiling from source with Cargo, Rust’s package manager.


Weiter >>

Effortlessly Backing Up Paperless-ngx with Cloudflare, rclone, and Docker

In the digital age, data backup is a non-negotiable part of managing any document management system. For those of us relying on the efficiency and organizational prowess of Paperless-ngx, ensuring our data is safe and recoverable is paramount. I’ve devised a seamless backup solution that utilizes the power of Cloudflare’s rclone and Docker, guaranteeing peace of mind and data security. Here’s a detailed look into my approach, which is applicable not just for Paperless-ngx but for any data stored on R2 storage. (https://www.cloudflare.com/developer-platform/r2/, Pricing: https://www.cloudflare.com/plans/developer-platform/ (10GB/Month for free))


Weiter >>

Ein Leitfaden für Senioren: Günstige Smartphones und Handys für Senioren bis 170 Euro

Mit über 80 Jahren beschlossen mein Opa, sich der digitalen Welt anzuschließen. Meine Oma nutzt bereits ein Xiaomi-Handy und schätzt dessen Einfachheit. Nun möchte mein Opa auch ein Mobiltelefon, das eine gute Kamera hat und einfach zu bedienen ist, aber dennoch WhatsApp und andere Funktionen unterstützt – und besonders wichtig: Kein Senioren Handy

Kurzversion: Am Ende ist es das Xiaomi Redmi 12 geworden, was zu dem Zeitpunkt bei Amazon für 149,90 Euro verfügbar war*


Weiter >>