Skip to main content


Remote-follow stopped working


Dear !Friendica Support ,

I normally can like/repeat comments from #Mastodon but now I get a blank page on my Friendica instance. So this is what I did:

1) I normally follow a user on Mastodon, but currently I don't see any of his posts or comments (maybe related?).
2) So my "backup" method is that I go to the comment's URL, e.g. https://social.snopyta.org/@kromonos/108483904376408153 and click "Favorite" there
3) Then I enter my id roland@f.haeder.net and normally that comment is being transferred to my instance
4) But now I get a blank page, e.g. https://f.haeder.net/follow?url=https%3A%2F%2Fsocial.snopyta.org%2Fusers%2Fkromonos%2Fstatuses%2F108483904376408153

Any quick ideas? Or should I better on an issue?
I'm definitely not someone who can provide support, but as a workaround, does it also not work to paste the URL into Friendica's searchbar?
@Liwott I guess it would lead to the same error message. But thank you for your concern. :-) And I have #fixed it.
Is there anything in the logs? Blank screen suggests something might be in PHP logs.
@Tobias your and @Liwott comments didn't reach here. And there is nothing on the logs.
@Roland Häder try checkout to the point before your "type hint" PR was merged. It has caused problems on my node, so maybe it is the root cause of that problem as well.
@Tobias This comment now came through:
2 hours ago (Received 5 minutes ago)
. So this one is fixed. Still the original one (URL `/follow?url=*`) is still giving a blank response. I still check it.
#FPM
@Tobias Ah, here we go: https://f.haeder.net/type-error.log.txt - The first type-hint string in Friendica\Content\Text\HTML::toBBCode() doesn't allow null but is called with null from various places.
@Tobiassrc/ModelAPContact.php on line 244 is a nested call. It doesn't catch any unwanted null values.
@Tobias I saw code like this:
$value = SomeFoo::bla('maybe');
if ($value != "") {
    $value = HTML::toBBCode($value);
}

But also with empty($value) instead of $value != "". So I changed it to the first one. I guess blaming the type-hint is wrong as it hides the actual problem (invocation with wrong variable types).
@Tobias I removed the one with APContact and now I check src/Protocol/ActivityPub/Processor.php on line 618 bad invocation.
@Tobias I changed it to $item['title'] = (empty($activity['name']) ? HTML::toBBCode($activity['name']) : ''); which should avoid the TypeError exception.

So thank you for pointing me the right direction.
@Tobias Ops, my fault. It needs to be (!empty($foo)) instead. I made a followup PR 11647 for this and it ultimately fixed the error discovered by me here.
This entry was edited (2 years ago)
Latest commit to my develop branch fixes this, plus I added a few more (loud) exceptions for some hopefully rare conditions. That's what an exception is for. Bad shit happens. ;-)
This entry was edited (2 years ago)
Okay, /follow?url=x is back when the instance is blocked. I just noticed it. I work on it already.