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

Der perfekte Einstieg in die Welt der Vinyls: Der Denon DP-300F und 2 Alternativen

Warum Vinyl?

Vinyl erlebt seit einigen Jahren ein riesiges Comeback. Der warme, analoge Klang, das bewusste Musikhören und das Sammeln von Schallplatten faszinieren immer mehr Musikliebhaber. Dabei ist nicht nur das nostalgische Feeling ausschlaggebend, sondern vor allem auch der unverwechselbare Klangcharakter von Vinyl – ein Klang, der trotz moderner digitaler Verfahren nach wie vor viele Fans begeistert.

Denon DP-300F[*] – Der ideale Allrounder für Einsteiger

Der Denon DP-300F[*] ist nach wie vor ein beliebter vollautomatischer Plattenspieler im Einsteigerbereich. Sein automatischer Tonarm sorgt für einen schonenden Umgang mit Nadel und Platte – perfekt, wenn du ohne großen Aufwand direkt in den Vinylgenuss starten möchtest.


Weiter >>

Ein Leitfaden für Senioren: Günstige Smartphones bis 100 Euro – Unsere 4 Favoriten & Erfahrungsbericht einer maßgeschneiderten Senioren-Lösung – UPDATE 2024/25

In diesem Beitrag stellen wir dir vier günstige Smartphones vor, die aktuell (Stand Dezember 2024) für unter 100 Euro erhältlich sind. Zusätzlich teilen wir eine ganz besondere Geschichte aus dem Familienkreis: Wie wir eines dieser Geräte für die Oma meiner Verlobten eingerichtet haben, damit sie trotz ihrer Parkinson-Erkrankung gut damit zurechtkommt.


Weiter >>

Getting Started with Alfresco SDK/Development: A Beginner’s Guide to Automating File Organization with Alfresco Behaviors

Alfresco is an enterprise content management platform known for its flexibility and extensibility. One powerful way to extend its functionality is through Behaviors, which allow you to run custom logic whenever specific repository events occur. For example, you can trigger custom actions whenever nodes are created, updated, or deleted.


Weiter >>

Enhancing Alfresco’s Public API (ACS): A Step-by-Step Guide to Custom Node Extensions with MIME Type Restrictions

Introduction

In today’s digital landscape, controlling and validating the types of content users can upload into systems is essential for security and data integrity. Alfresco, a leading open-source content services platform, offers a flexible public API that enables developers to create custom extensions and adapt the platform to specific organizational needs. This article provides a step-by-step guide to implementing a MIME type restriction feature in Alfresco’s Nodes API, allowing for more controlled and secure content uploads.


Weiter >>