f.haeder.net

Hacking friendica code with trailing/leading white-spaces

When editing #Friendica code, I use a local commit hook, finding leading and trailing white-spaces. The hook itself is GIT's default pre-commit hook plus a few extra lines:

# Find bad scripts
./util/typo.php

# PHPUnit
if [ -x ./vendor/bin/phpunit ]
then
./vendor/bin/phpunit || exit 255
fi


So, please don't wonder when I touch "the whole file". Then I have just changed DOS -> Uni* line-break (CRLF to LF) as it was being detected as trailing white-space characters.
#Friendica code friendica white-space
js/country.js is indented with space and tabs, I fix that to tabs now. Plus I have fixed some JS warnings due to missing semicolon.
I would also recommend to start with #cache-busting which means, adding version numbers to JS/CSS files (and URLs).
Browsers (even #Firefox #Quantum) tend not to download CSS/JS when they have downloaded it already. This forces your users to press CTRL+F5 (under Firefox at least). The fix is to include a version number in the URL and always increment it when you change something.

Examples: /js/main.js?v=1.0.0 or /css/default.css?v=1.0.0

Static files normally ignore parameters so this is safe to do so. When you change that file, just increment the last patch number until you want it (I prefer to increment from 1.0.9 to 1.1.0 but that is up to the community (you should come up with a versioning convention). #cache-busting
Na, #quantum should be the correct hashtag. #bug

Roland Häder has an updated public profile, changing Religion and Political Views.

NGO-Experte über Nobel-Stiftung: Geld bei Waffenfirmen angelegt -

Wieso fällt mir auf Anhieb #BarakObama ein ... Genau, weil er mit Drohnen Menschen tötet.

Fatal error: Call to a member function escape() on null

@Friendica Developers I get the following error after I updated to latest develop code:

Fatal error: Uncaught Error: Call to a member function escape() on null in /../friendica/include/dba.php on line 1104
Error: Call to a member function escape() on null in /../friendica/include/dba.php on line 1104

Call Stack:
 0.0036 371800 1. {main}() /../friendica/include/dbstructure.php:0
 0.0533 938728 2. dbstructure_run(array(2), long) /../friendica/include/dbstructure.php:1827
 0.0651 1037352 3. update_structure(true, true, ???, ???) /../friendica/include/dbstructure.php:1783
 0.0654 1038120 4. Friendica\Core\Config::set(string(6), string(11), long) /../friendica/include/dbstructure.php:207
 0.0655 1040408 5. dba::update(string(6), array(1), array(2), true) /../friendica/src/Core/Config.php:167

Variables in local scope (#5):
 $array_element = *uninitialized*
 $array_key = *uninitialized*
 $condition = array ('cat' => 'system', 'k' => 'maintenance')
 $condition_string = *uninitialized*
 $content = *uninitialized*
 $do_insert = *uninitialized*
 $do_update = *uninitialized*
 $fieldname = *uninitialized*
 $fields = array ('v' => '1')
 $old_fields = TRUE
 $params = *uninitialized*
 $params1 = *uninitialized*
 $params2 = *uninitialized*
 $sql = *uninitialized*
 $table = 'config'
 $values = *uninitialized*


Any idea how to fix this? Did I miss something to update on my .htconfig.php file?
@Friendica Developers code fatal-error friendica
I cannot reproduce, but have created some possible workaround: https://github.com/friendica/friendica/pull/3776
That error seem to be fixed but now only CREATE statements are being processed, nothing else. I have fixed all my parser errors which were caused by missing curly braces.
Added a late code-review pointing out some stuff that should be rewritten:

"dba" is now static by annando · Pull Request #3778 · friendica/friendica

Sorry, no progress here. Maybe next weekend, as I have 3 additional more days no work! #atwork
Re-tested it. And seems to be fixed. Need more testing at home before I update this instance.
@roland @heluecht btw danke für den Screenshot vom Psytrance Forum ;)

Acme-Challenge on Apache 2.4 fails on some virtual hosts, but some not

I just posted this on #StackExchange: If you know the answer, please help me. :-) I need to update certificates for https://git.mxchange.org and https://searx.mxchange.org (which is some-why returning 403 on any requests).
#StackExchange acme-challenge apache2.4 letsencrypt
Fixed, please refer to my own answer.

GMX und Web.de Server

Aktuell erreichen mich von den beiden Servern folgende Mails:

<foo-bar@gmx.net>: host mx00.emig.gmx.net[212.227.15.9] refused to talk to me:
554-gmx.net (mxgmx014) Nemesis ESMTP Service not available 554-No SMTP
service 554-Bad DNS PTR resource record. 554 For explanation visit
http://postmaster.gmx.com.invalid/en/error-messages?ip=188.138.90.169&c=rdns



Das foo-bar und .invalid habe ich eingefuegt, um Links untuechtig zu machen bzw. die Mail-Adresse zu anonymisieren.

Weiss wer, das hier lost ist? Hat die United-Internet AG Mist gebaut oder ist bei mir (mail.mxchange.org) wirklich was nicht okay? Und wenn bei mir, wie kann ich es fixen?

Mit anderen Anbietern habe ich das nicht.

Off-Topic: Diesen Text habe ich ausserhalb von Friendica's Formular eingeben muessen, da sonst bei jedem tag das Browser-Fenster fuer ein paar Sekunden einfriert. Hier sollte mal das JavaScript ueberarbeitet werden.
gmx mailer-daemon united-internet-ag webde
Later posts Earlier posts