[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-16 Thread Tgr
Tgr added a comment.
To be clear, this is not something that exists for SHORTDESC currently. Shouldn't be hard to add though, and other magic words already use the mechanism so it won't make things more complex than they already are.TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: TgrCc: Tgr, RexxS, JJMC89, Aklapper, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-16 Thread RexxS
RexxS added a comment.
Thank you @Tgr.

I think that is the solution that Peter and I have been looking for.

Can I put in a request to have the documentation at https://www.mediawiki.org/wiki/Help:Magic_words#Technical_metadata updated, please? (presumably the "Affects page content") section of the table? I'd do it myself if I was certain about the information for the 'Versions' column.TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: RexxSCc: Tgr, RexxS, JJMC89, Aklapper, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-16 Thread Tgr
Tgr added a comment.
I can see why people want to put the description on the top of the wikitext. On the other hand, every magic word / parser function overrides the side effect of earlier invocations with that of later ones, and I don't think it's a good idea to change that - wikitext is complex enough without editors having to memorize which magic word works in which order of precedence.

noreplace seems like a reasonable compromise - use {{SHORTDESC:foo|noreplace}} in templates, and if there is an invocation without noreplace, that takes precedence over the noreplace ones.TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: TgrCc: Tgr, RexxS, JJMC89, Aklapper, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-15 Thread Pbsouthwood
Pbsouthwood added a comment.
It does not look like I am going to get a reply, so will have to open a task to have it fixed without knowing how practicable it isTASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: PbsouthwoodCc: RexxS, JJMC89, Aklapper, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-04 Thread RexxS
RexxS added a comment.

In T193857#4183293, @JJMC89 wrote:

In T193857#4183281, @Pbsouthwood wrote:
I see that JJMC89 changed my task name. I would like to know why, as the new name does not make sense to me.


It was renamed because the magic word stores the short description in the database; it does not return anything.


In T193857#4183283, @RexxS wrote:
The renaming is because JJMC89 is only considering the functionality of storing a value of prop=description. Perhaps he wasn't aware that the Wikipedia app actually returns the value as rendered text close to the top of the article displayed.


An API/app returns what is in the database.


If you want to be pedantic, the magic word doesn't actually do anything. There is code that reads the magic word's value and stores it in the database, just as there is code that reads the database and renders it. It's just as important to be able to see the complete flow of information from wikitext to database to rendered page as it is to see the compartmentalised view. That flow happens for the magic words, just as it does for any other piece of wikitext. As far as users are concerned, they won't worry about how the backend works.TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: RexxSCc: RexxS, JJMC89, Scoopfinder, Aklapper, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-04 Thread Pbsouthwood
Pbsouthwood added a comment.
Fine, that is now clear to me. Thanks for clarifying
Is my question now sufficiently clear to get an answer?
{I dont know how {{DISPLAYTITLE}} and {{SORTKEY}} work, or what noerror and noreplace do)TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: PbsouthwoodCc: RexxS, JJMC89, Scoopfinder, Aklapper, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-04 Thread JJMC89
JJMC89 added a comment.

In T193857#4183281, @Pbsouthwood wrote:
I see that JJMC89 changed my task name. I would like to know why, as the new name does not make sense to me.


It was renamed because the magic word stores the short description in the database; it does not return anything.


In T193857#4183283, @RexxS wrote:
The renaming is because JJMC89 is only considering the functionality of storing a value of prop=description. Perhaps he wasn't aware that the Wikipedia app actually returns the value as rendered text close to the top of the article displayed.


An API/app returns what is in the database.TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: JJMC89Cc: RexxS, JJMC89, Scoopfinder, Aklapper, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-04 Thread Pbsouthwood
Pbsouthwood added a comment.
OK, got it. So the problem is that the last one is stored, where it would be more useful if the first one was stored. It would seem that there is a routine that runs through the whole page, changing the value each time an instance is found,  instead of stopping as soon as the first instance is found?TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: PbsouthwoodCc: RexxS, JJMC89, Scoopfinder, Aklapper, Reedy, Magioladitis, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-04 Thread RexxS
RexxS added a comment.
The renaming is because JJMC89 is only considering the functionality of storing prop=description. Perhaps he wasn't aware that the Wikipedia app actually returns the value as rendered text close to the top of the article displayed.TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: RexxSCc: RexxS, JJMC89, Scoopfinder, Aklapper, Reedy, Magioladitis, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-04 Thread Pbsouthwood
Pbsouthwood added a comment.
If there are more than one short descriptions on the page the API call gets the last one. It would be far better if it got the first one, as there are a large number of pages where there is a default short description generated from a template or infobox, but for some of these a hand crafted short description would be better, which would be at the top of the page, so that is the one that should be displayed.

I see that JJMC89 changed my task name. I would like to know why, as the new name does not make sense to me.TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: PbsouthwoodCc: RexxS, JJMC89, Scoopfinder, Aklapper, Reedy, Magioladitis, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-04 Thread RexxS
RexxS added a comment.
If {{SHORTDESC}} appears more than once on an article's page, then the text in the final instance takes precedence.

Since the output on Wikipedia app (and previously on mobile view) appears at the top of the article, immediately after the title, it would seem natural to fix any errors by editing something also at the top of the article.

However, if there is another instance of the magic work lurking somewhere else on the page as well (perhaps buried inside a template), then an editor trying to fix a problem will be perplexed when their edit to the first instance has no effect.

Peter is asking whether it would be possible for the first (i.e. nearest the top) instance of the magic word could override any later instances, in order to avoid the issue I describe.TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: RexxSCc: RexxS, JJMC89, Scoopfinder, Aklapper, Reedy, Magioladitis, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T193857: Short description magic word stores last instance on page

2018-05-04 Thread JJMC89
JJMC89 added a comment.
I don't see a good reason to make {{SHORTDESC}} function differently than {{DISPLAYTITLE}} and {{DEFAULTSORT}}.

Perhaps the adding the noerror and noreplace functionality would be useful.TASK DETAILhttps://phabricator.wikimedia.org/T193857EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: JJMC89Cc: JJMC89, Scoopfinder, Aklapper, Reedy, Magioladitis, Liuxinyu970226, Pbsouthwood, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs