Page MenuHomePhabricator

Add a tracking category to Template:BillboardID on English Wikipedia
Closed, ResolvedPublic

Description

Each of the subtemplates of Template:BillboardID responds with "Illegal name entered" if the name that an editor types is not listed in the template, but there does not appear to be a tracking category associated with this error message. A change in error-detection in the citation templates is placing these instances of the template in Category:Pages with URL errors, but that is a noisy category. The task is to create a tracking category that corresponds to "Illegal name entered" errors.

See https://en.wikipedia.org/wiki/Template_talk:BillboardID

Event Timeline

Jonesey95 created this task.Nov 7 2015, 4:37 PM
Jonesey95 raised the priority of this task from to Needs Triage.
Jonesey95 updated the task description. (Show Details)
Jonesey95 added a subscriber: Jonesey95.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptNov 7 2015, 4:37 PM

I will mentor this in #GCI2015

@Jonesey95: Awesome, thanks! Could you also add yourself to the mentor table, please? (And of course: More tasks welcome, please spread the word!)

Aklapper renamed this task from Add tracking category to Template:BillboardID to Add a tracking category to Template:BillboardID on English Wikipedia.Dec 5 2015, 8:31 PM

Created as https://codein.withgoogle.com/dashboard/tasks/5708897172062208/ with a note:

After you have claimed this task, any communication MUST happen either in https://phabricator.wikimedia.org/T118081 with Jonesey95, or on the "Talk" page of https://en.wikipedia.org/wiki/User:Jonesey95 . Jonesey95 is the actual mentor of this task who will help you and who will review your work.

I'm working on this! I've created a page "Category:Pages with Illegal name entered errors". How should I proceed now?
https://en.wikipedia.org/wiki/Category:Pages_with_Illegal_name_entered_errors

First, read the talk page: https://en.wikipedia.org/wiki/Template_talk:BillboardID

Then, create a sandbox version of https://en.wikipedia.org/wiki/Template:BillboardID (scroll to the bottom of the documentation for a link). Do not ever edit the live template.

You'll also probably need to make a sandbox version of https://en.wikipedia.org/wiki/Template:BillboardID/A

Change the BillboardID sandbox to call BillboardID/A/sandbox.

The goal is to make the template emit a category in addition to an error message. The category name should be "Category:Articles using Billboard ID with invalid artist"

Also change the error message in the subtemplate to "Error: invalid artist".

You can look at https://en.wikipedia.org/wiki/Template:Death_date_and_age for an example of how categories can be added to a template. This one may need to work a little differently, since the subtemplate emits a URL. You'll need to figure out a different way to test for the validity of the artist parameter, perhaps by testing what the subtemplate returns.

You can test the sandbox templates by calling them (e.g. {{BillboardID/sandbox|artist}}) in your own user sandbox.

Let me know when you get stuck.

I'm sorry, I'm kind of lost here (it's my first time working with templates, categories, etc) :)
I made the Template:BillboardID/sandbox. How do I redirect it to /A/sandbox?

Where do I change the error message for a sub template? Also, where does all the testing actually happen?
Thank you for your patience, I'm a beginner! :)

How do I redirect it to /A/sandbox?

Hmm, I'm confused as nobody asked for redirecting anything. Did you maybe mean "calling" instead?

In general, have you checked and read https://www.mediawiki.org/wiki/Manual:Templates ?

Where do I change the error message for a sub template?

What have you tried so far to make it work? If you are more specific it's easier to help and understand where exactly you got stuck. :) Thanks for working on this!

Sorry, I assumed more familiarity with how Wikipedia works. First, look at the "death date and age" template I linked above, click on the sandbox link in the documentation, click on View Source (or Edit), but do not save, and walk through the template's syntax until you have a basic understanding of how it works, especially the error categorization.

I have created the template sandbox for you here:

https://en.wikipedia.org/wiki/Template:BillboardID/sandbox

and here:

https://en.wikipedia.org/wiki/Template:BillboardID/A/sandbox

You can try out the sandbox version of the template here:

https://en.wikipedia.org/wiki/User:Pranavmk98/sandbox

I put an example there for you. Use only artist names that start with "A" for now.

I have also create this sandbox:

https://en.wikipedia.org/wiki/Template:BillboardURLbyName/sandbox

That template calls BillboardID.

Again, I don't know where it makes sense to emit the error category, since you can't emit it within a citation template, as in the example on the BillboardURLbyName documentation page.

Thank you for your help! So I've understood the task now, and when I tried adding the BillboardID/A/sandbox to this category: https://en.wikipedia.org/wiki/Category:Articles_using_Billboard_ID_with_invalid_artist if an error message was returned, it worked! So would I have to do this for 1-9 and A-Z? :)

That's progress. To make it useful, the templates that use BillboardID should emit this category in a reasonable way. That includes:

https://en.wikipedia.org/wiki/Template:BillboardURLbyName/sandbox

https://en.wikipedia.org/wiki/Template:BillboardURL/sandbox

https://en.wikipedia.org/wiki/Template:Singlechart/sandbox

How would I make these templates emit a category? I mean, on what basis should I test for "Illegal name entered"? I could add a condition at the end of each subtemplate, but that wouldn't be efficient, would it?

I've tried a little something, and it works during testing. This removes the need of adding the error testing under each subtemplate/each template which calls BillboardID. When I tested this with the letter 'A', and with Template:BillboardURLbyName, it is working (I'm pretty sure it would work for any letter too, but I haven't made any sandboxes yet). Let me know what you think!
https://en.wikipedia.org/wiki/Template:BillboardID/sandbox

I removed white space in the template that was breaking URLS, and I added some examples to your user sandbox. Use your sandbox as a page for test cases to make sure you understand how the live templates work. Examples of the live templates and of your sandbox, using valid artists, should always work.

Thanks! I added some more test cases, but for the Singlechart template, the Illegal name entered doesn't seem to appear. Also, it still says "Illegal Name entered" for BillboardURL (although it does call BillboardID. Why is this happening?

You have to modify the sandbox version of each template to call the sandbox version of the templates that it calls. See my recent changes to Singlechart and BillboardURL for an example.

Make sure to add each of the template sandboxes to your watchlist and check your watchlist to see diffs when I change something.

All right! I made testcase pages for each of the templates which call BillboardID, and the errors they produce are properly categorized here: https://en.wikipedia.org/wiki/Category:Articles_using_Billboard_ID_with_invalid_artist

Next steps?

I'm pretty confident that if this were implemented in the real template, it would work, and categorize all pages (including the ones that call Singlechart, BillboardURL, etc). Is it possible to test this by introducing it in the actual template?
Thanks!

Hi! Is this complete, or how do I proced?

proceed* oops

I added a new, simplified section to the singlechart testcase page so that it actually shows the desired error and emits the error category without any spurious reference errors.

Before modifying any template, the change needs to be discussed on the template's talk page. I recommend posting links to the testcase pages and the category page, along with an explanation of the proposed changes.

Post the notice on the talk page for BillboardID (continuing my discussion thread), then post a link to that notice on the talk page for Singlechart and BillboardURL.

If the change is accepted, we'll need to modify all of the subtemplates of BillboardID (A-Z and 0-9).

It looks like this might work.

Super. Now we need to wait a few days for feedback before changing the BillboardID template to add the tracking category. Changing "illegal name entered" to "invalid artist" in the subtemplates is optional, but it makes the error message more consistent with other error messages on Wikipedia and with the new category's name.

Great! @Aklapper: Can the GCI task please be marked as complete now? I'll definitely continue to work on this, after the feedback is obtained!

Thanks everybody! I've marked the task on the GCI site as completed.

Jonesey95 triaged this task as Low priority.Jan 28 2016, 10:00 PM

This task is "Approved" as done as part of the Google Code-in. I will take care of implementation from the sandbox and subsequent troubleshooting. Great work, Pranavmk98.

Danny_B closed this task as Resolved.Jun 1 2016, 2:45 AM
Danny_B added a subscriber: Danny_B.
Danny_B removed a subscriber: Danny_B.Jun 1 2016, 2:45 AM