Template talk:IMDb title

(Redirected from Template talk:IMDb title/doc)
Latest comment: 2 months ago by Gonnym in topic Not In Wikidata Warning

Annoying "warning"

edit

What makes this warning/error stop? Preview warning: Template:IMDb episodes should be used for list of episodes. The case in question has nothing to do with episodes or TV, and is a stand-alone movie.  — SMcCandlish ¢ 😼  11:05, 20 December 2023 (UTC)Reply

Which article are you referring to? Assume it has a Wikidata ID that's listed in the template meaning it's being recongised as something like a TV episode, that would need to be changed to reflect what it is. Indagate (talk) 11:16, 20 December 2023 (UTC)Reply
Please give the exact page as an example. Gonnym (talk) 11:23, 20 December 2023 (UTC)Reply
Glossary of cue sports terms  — SMcCandlish ¢ 😼  20:43, 20 December 2023 (UTC)Reply
That's not an appropriate use of this template. It should be used as an external link, not as a reference. Indagate (talk) 20:51, 20 December 2023 (UTC)Reply
What Indagate said. Not only should IMDb not be used as a source per WP:RS, this template's only valid use is as an external link template. So while the preview error did not give the correct error message, not a lot we can do when editors completely misuse a template. That said, it did at least inform you something was wrong. Gonnym (talk) 21:47, 20 December 2023 (UTC)Reply

This error is popping up on some list of character pages, for example List of Agents of S.H.I.E.L.D. characters and List of The Lord of the Rings: The Rings of Power characters (only shows when in show preview mode). - adamstom97 (talk) 17:58, 3 June 2024 (UTC)Reply

I think the template needs to handle some more cases where the qid param is used. I've made some changes in the sandbox for this. I'll wait a little while in case anyone has any comments on it and if not I'll apply them soon. -- WOSlinker (talk) 18:41, 3 June 2024 (UTC)Reply
Can you explain what your changes do? Gonnym (talk) 19:45, 3 June 2024 (UTC)Reply
In the current version of the template, the first occurence of {{#property:P345}} passes over the qid param. The second occurence does not, so is displaying a warning in preview and adding a tracking category due to checking the wrong wikidata page. The two uses of the {{Wikidata}} template were also checking information from wikidata but were using the current page rather than the page passed as the qid param. I'm thinking it should be checking that other page when deciding whether to add any tracking categories. -- WOSlinker (talk) 21:47, 3 June 2024 (UTC)Reply
It should always check the current page and not the QID used. Placing this template on an unrelated page but passing it a qid of that page bypasses the exact reason this check is in place. Gonnym (talk) 06:05, 4 June 2024 (UTC)Reply
There doesn't seem much point in having the qid parameter as an option in this template then. -- WOSlinker (talk) 10:26, 4 June 2024 (UTC)Reply
List of character articles are currently a valid use with this template and a qid. The template just needs to be modified to bypass the ID validations for these articles. Gonnym (talk) 10:48, 4 June 2024 (UTC)Reply

IMDb (identifier) to IMDb

edit

Can the wikilink in the template be changed from IMDb (identifier) to its proper target at IMDb? — Paper Luigi TC 08:38, 1 January 2024 (UTC)Reply

Looks was link was changed here by @MJL: so pinging them. Thanks, Indagate (talk) 08:48, 1 January 2024 (UTC)Reply
@Indagate and Paper Luigi: The redirect is used to avoid cluttering Special:WhatLinksHere/IMDb. –MJLTalk 17:05, 2 January 2024 (UTC)Reply
Okay, I see where you're coming from, but what I don't understand is how de-cluttering a special IMDb redirect page a grounds for the inclusion of a disambiguated redirect target in the template? Is there a precedent that you're trying to follow? — Paper Luigi TC 07:29, 7 January 2024 (UTC)Reply
I've thought it over, and, yes, I can see how the special namespace page with inclusion of every article with an IMDb title entry using this template would clutter it quite tremendously. That would be a very, very large increase in links pointed that way. I would just like to be familiar with a policy or guideline that supports this reasoning. — Paper Luigi TC 05:54, 19 January 2024 (UTC)Reply
@Paper Luigi: I don't know of a policy or guideline, but this was an intentional choice that can be seen in almost every identifier link on Wikipedia. It's documented at Template:R from identifier and mentioned at Help talk:Citation Style 1/Archive 94. Daask (talk) 16:54, 29 July 2024 (UTC)Reply

Edit request 1 July 2024

edit

Please copy the changes from the sandbox. Have replaced the switch for sections awards and cast with the same done automatically by checking Wikidata strings, so don't need to manually include a section parameter. Removed the switch from the check for unknown parameters as not needed anymore. Also added section for soundtrack as mentioned in Template talk:IMDb title/Archive 1#Section: soundtrack? but looks like wasn't merged.

Can't be checked in Testcases because this doesn't use the qid parameter, can be checked on use case articles copying the IMDb template already there and adding /sandbox, should be same in preview, such as Hot Fuzz (soundtrack), List of accolades received by WandaVision, or List of Daredevil (TV series) characters

Will update doc if accepted. Thanks, Indagate (talk) 17:54, 1 July 2024 (UTC)Reply

Looking over the code there are some issues. First, the first --> is actual text (if you don't have the syntax highlighting option enabled in the editor it helps a lot catching these), but more importantly, the code keeps going even if the first Wikidata find is correct. This should either be an if/else tree or if possible a shorter if/else tree with a switch. If you can fix these issues great, if not, let me know and I'll take a look at it. --Gonnym (talk) 18:42, 1 July 2024 (UTC)Reply
Thanks, will have a look. Done tests with Petscan for the properties against categories and they seem to not overlap so thought rules to prevent overlap wouldn't be necessary but will add. Indagate (talk) 19:03, 1 July 2024 (UTC)Reply
That's done @Gonnym thanks, merged the ifeq's for that, use cases still work. Indagate (talk) 20:18, 1 July 2024 (UTC)Reply
I've modified the code a bit and added |qid_testcases= so testcases can be created. I've created 3 testcases but you've added 7 scenarios so can you please add the other 4? Gonnym (talk) 08:51, 2 July 2024 (UTC)Reply
ah looks great thanks, added more testcases. Q67325957 not added as isn't currently used for movies/TV in Wikidata, only musicals not covered by IMDb, but left in template code just in case it gets used in future. Indagate (talk) 10:30, 2 July 2024 (UTC)Reply
OK, looks like everything is working. I'll wait a day or two to see if anyone has any comments or objections. Gonnym (talk) 10:53, 2 July 2024 (UTC)Reply
sounds good, thanks Indagate (talk) 10:55, 2 July 2024 (UTC)Reply
Added. If there are any issues, please post here. Gonnym (talk) 09:34, 4 July 2024 (UTC)Reply
Thanks, will update doc later today. The unknown parameters category update in progress, has a mix of correct uses where section not needed anymore, and incorrect uses as a ref. Indagate (talk) 11:18, 4 July 2024 (UTC)Reply
Yeah, the ref issue is known. I've been slowly trying to remove these when I can. Gonnym (talk) 11:30, 4 July 2024 (UTC)Reply

Not In Wikidata Warning

edit

Just going to point out that the preview warning "Preview warning: Template:IMDb title is missing ID and not present in Wikidata." shouldn't show when qid is used as that is the whole point of the parameter, to state that it is in wikidata, just another item. It also causes some previews to look rediculous with warning such as List of accolades received by Marvel Cinematic Universe films even when the template is exclusivly used as an External link. If you need a warning for qid being used then a different preview warning should be created. Thats my opinion on it anyway. Terasail[✉️] 19:36, 16 August 2024 (UTC)Reply

The real issue is that the QID should never have been added to this template. This template should not be used at all for references and almost never in an external link section of an unrelated subject, those should link to the actual Wikipedia page which has the relevant links (WP:LINKFARM). The EL section of the mentioned article looks exactly like an excessive list. Regardless though, until the actual cleanup is finished, it is better to catch false positives then to hide all of the actual errors. As a side note, I'll say that your replacement of valid IDs with QID is a bit pointless, you could just as much remove the ID completely (which would then allow another way to track incorrect usages of QID). Gonnym (talk) 07:29, 17 August 2024 (UTC)Reply