Page MenuHomePhabricator

#property: calls for non-existent properties should add a tracking category
Closed, ResolvedPublic

Description

Currently if you add something like {{#property:p1234234234}}, it simply returns a empty string. (Example: https://test2.wikipedia.org/w/index.php?title=Germany&diff=53273&oldid=53030)
It would be nice if we could add a tracking category to find these instances.

Same with {{#property:label}}, where no property actually uses the specified label.


URL: https://test2.wikipedia.org/w/index.php?title=Germany&diff=53273&oldid=53030

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:29 AM
bzimport set Reference to bz48799.
bzimport added a subscriber: Unknown Object (MLST).

Well, what should the parser function return in an error case? It would have to be some pre-defined, fixed string, right? But that's not good when shown to the user. So, rather, an HTML formatted error?

The reason that it currently returns an empty string is to indicate "there's nothing here", so it can be used in conditionals. If you need more fine grained info, you can use Lua.

I'd actually like a nice way to return more detailed status/error info from a parser function, but I don't see a good way to do that.

Kunal: *poke* about Daniel's question

(In reply to Daniel Kinzler from comment #1)

Well, what should the parser function return in an error case? It would have
to be some pre-defined, fixed string, right? But that's not good when shown
to the user. So, rather, an HTML formatted error?

Sure, that's reasonable. But probably deserves another bug?

The reason that it currently returns an empty string is to indicate "there's
nothing here", so it can be used in conditionals. If you need more fine
grained info, you can use Lua.

Adding a tracking category won't prevent that.

Yea, I didn't know how the "magic" tracking category feature worked when I wrote this. I was assuming it would be returned as wikitext. Calling ParserOutput::addTrackingCategory() would be fine.

Also, by now, I'm convinced that in case of an error, the parser function should return a localized, html formatted string wrapped in a span or diff using class="error". Because that can be detected with the {{#iferror}} function.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Florian added a subscriber: Florian.

@Ladsgroup: Are you already registered in GCI? If so, would you like to assign yourself to task: https://codein.withgoogle.com/dashboard/tasks/5984571959017472/ or give me your username, so I can add you? If you're not registered in GCI, yet, I could, if you want, also invite you as a mentor (and I would very appreciate it to welcome you as a Mentor! :))

I've added a comment to the GCI task that communication must happen in this Phabricator task, as not all mentors are registered on the GCI site. I'll act as a mentor on the GCI site.

Change 325180 had a related patch set uploaded (by Sn1per):
Add a tracking category to pages with unresolvable property labels

https://gerrit.wikimedia.org/r/325180

Change 325180 merged by jenkins-bot:
Add a tracking category to pages with unresolvable property labels

https://gerrit.wikimedia.org/r/325180