You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$msg = 'request is "null", falling back to display discussion as for Guest. This is probably due to another extension not passing this parameter to "Formatter->render()". See stack trace below.';
$this->log->report(newRuntimeException($msg));
}
$actor = newGuest();
} else {
$actor = RequestUtil::getActor($request);
}
$filterCrossReferences = function ($attributes) use ($actor) {
It is not very optimised for posts that contains multiple tags of this kind. Even less so when multiple tags all refer to the same discussion. It would be good first aggregate all the discussion ids to be able to fetch all available discussion in a single DB query.
Then, at replacement time, if the discussion is not in the fetched collection, when can mark it as unknown.
This is also a good opportunity to refactor the code to parse the XML only once and make the replacements in the resulting DOM instead of parsing it 3 times with Utils::replaceAttributes().
The text was updated successfully, but these errors were encountered:
Currently the Renderer makes 1 DB query for each
CROSSREFERENCE*
tag in the post.flarum-ext-cross-references/src/Formatter/CrossReferencesRenderer.php
Lines 69 to 97 in 152437d
It is not very optimised for posts that contains multiple tags of this kind. Even less so when multiple tags all refer to the same discussion. It would be good first aggregate all the discussion ids to be able to fetch all available discussion in a single DB query.
Then, at replacement time, if the discussion is not in the fetched collection, when can mark it as
unknown
.This is also a good opportunity to refactor the code to parse the XML only once and make the replacements in the resulting DOM instead of parsing it 3 times with
Utils::replaceAttributes()
.The text was updated successfully, but these errors were encountered: