On 19 June 2018 at 01:35, Stas Malyshev <smalys...@wikimedia.org> wrote:

> 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?
>

Hi Stas,
would \Wikibase\Lexeme\PropertyType\FormIdHtmlFormatter be of any help for
you in this case, at least temporarily?

In any case, thanks for bringing the issue up. Regarding link formatting:
this is the very topic we're working actively right now, in a broader
context, and all you need should be there rather soon. Hence I'd prefer to
avoid duplicating efforts now.
If this works for you Stas, my suggestion would be that you assume that the
link formatting code is there, and make sure the data needed to display the
link is in the search results etc. Once the ground work we're doing now is
finished, and Lydia has defined how the search result link etc should look,
we'll add it there.

Best



>
> Thanks,
> --
> Stas Malyshev
> smalys...@wikimedia.org
>



-- 
Leszek Manicki
Software Developer

Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
http://wikimedia.de

Imagine a world, in which every single human being can freely share in the
sum of all knowledge. That‘s our commitment.

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.
_______________________________________________
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech

Reply via email to