Hi!
I can reimplement it manually, but I would be largely duplicating what HtmlPageLinkRendererBeginHookHandler is supposed to do. The problem seems to be that it is not doing it right. When the code works on the link like /wiki/Lexeme:L2#L2-F1, it does this:
$entityId = $foreignEntityId ?: $this->entityIdLookup->getEntityIdForTitle( $target );
Which produces back LexemeId instead of Form ID. It can't return Lexeme ID since lexeme does not have content model, and getEntityIdForTitle uses content model to get from Title to ID. So, I could duplicate all this code but I don't particularly like it. Could we fix HtmlPageLinkRendererBeginHookHandler instead maybe?
Also, looks like Form actually doesn't have link-formatter-callback and its own link formatter code. So I wonder if there's an existing facility to format links to Forms? Leszek, do you have any information on this?
Thanks,