Property talk:P4073

From Wikidata
Jump to navigation Jump to search

Documentation

Fandom wiki ID
identifier of a topic's wiki, in Fandom.com
RepresentsFandom wiki (Q106513246)
Associated itemFandom (Q17459)
Applicable "stated in" valueFandom (Q17459)
Data typeExternal identifier
Domainpopular media topics (note: this should be moved to the property statements)
Allowed values([a-z]{2,}(?:-[a-z]+)?\.)?[a-z0-9]+(-[a-z0-9]+)*
ExampleThe West Wing (Q3577037)westwing
James Bond (Q844)jamesbond
Pink Floyd (Q2306)pinkfloyd
VroniPlag Wiki (Q2535102)de.vroniplag
World of Warcraft (Q131007)wowwiki
Source
According to this template: http://www.wikia.com/fandom
According to statements in the property:
Global Sitemap
When possible, data should only be stored as statements
Formatter URLhttps://community.fandom.com/wiki/w:c:$1
https://www.wikia.com/wiki/w:c:$1
https://$2.fandom.com/$1/
https://community.fandom.com/index.php?title=w:c:$1
https://$1.fandom.com/
Tracking: usageCategory:Pages using Wikidata property P4073 (Q59843764)
See alsoFandom article ID (P6262), Gamepedia wiki ID (P6867), wiki.gg wiki ID (P11994), official wiki URL (P12203)
Lists
Proposal discussionProposal discussion
Current uses
Total3,903
Main statement3,87999.4% of uses
Qualifier50.1% of uses
Reference190.5% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P4073#Unique value, SPARQL (every item), SPARQL (by value)
Format “([a-z]{2,}(?:-[a-z]+)?\.)?[a-z0-9]+(-[a-z0-9]+)*: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P4073#Format, SPARQL
Required qualifier “language of work or name (P407): this property should be used with the listed qualifier. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P4073#mandatory qualifier, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P4073#Entity types
Scope is as main value (Q54828448), as reference (Q54828450): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P4073#Scope, SPARQL
Conflicts with “instance of (P31): fictional universe (Q559618): this property must not be used with the listed properties and values. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P4073#Conflicts with P31, search, SPARQL

Mix'n'match[edit]

@Roseohioresident, ChristianKl, Nikkimaria, Sadads: I have added ~45000 Wikias to Mix'n'match here. Mahir256 (talk) 18:59, 20 June 2017 (UTC)[reply]

ILL[edit]

ILL: On Freeciv (Q424271) I've replaced ca.freeciv by freeciv, please add an example if this property can and SHOULD be used multiple times for FANDOM wikis in multiple languages. Or revert it with a note on Talk:Q424271. –46.59.175.56 05:03, 26 December 2017 (UTC)[reply]

@Back ache: It is not clear to me what you exactly want to express with

URL match pattern (P8966)^https?:\/\/(.+)\.fandom\.com\/wiki\/(?:.+)_Wiki

As I said, every string matched by this pattern is also matched by the other one, thus the statement above seems totally useless to me. May you better explain what you tried to tell me here?

P.S. Why have you rollbacked all my edits instead of just this one? Horcrux (talk) 16:57, 4 December 2023 (UTC)[reply]

If you go to https://money-heist.fandom.com this will show you what I am trying to correct, it redirects straight to https://money-heist.fandom.com/wiki/Money_Heist_Wiki so instead of being recognised as a fandom site it is instead incorrectly recognised as a page on a fandom.
The second thing to fix was that the site name has a hyphen in it and is valid whereas the original regex only captured letters.
Back ache (talk) 01:33, 5 December 2023 (UTC)[reply]
@Back ache: I think there are some mistakes here:
  1. It is immediate to verify that a regex like ^https?:\/\/(.+)\.fandom\.com\/ is perfectly capable of matching a url like "https://money-heist.fandom.com/wiki/Money_Heist_Wiki" (note that the regex is missing the final $, so that more characters can be matched in the final part of the URL).
  2. The regex that you specified here contains a typo, since \.+ matches literally only dots. Maybe you wanted to specify .+. In this case, the problem of hyphen is already solved by the first regex and we don't need a second one.
  3. For what concerns the subdomain format, if you wanted just to add hyphens as accepted characters, then the pattern .+ is too broad: it is sufficient to use the character class [\w-]. Then, we also need to consider sub-subdomains (for different linguistic versions), maybe by adding a trailing pattern like ([a-z]+(-[a-z]+)?\.)?.
Definitely, I think ^https?:\/\/((?:[a-z]+(?:-[a-z]+)?\.)?[\w-]+)\.fandom\.com(?:$|\/) (check it) is a perfectly valid (and sufficient) pattern for the URLs in question. --Horcrux (talk) 07:01, 5 December 2023 (UTC)[reply]
Hi, sorry if we got off "on the wrong foot" it's nice to meet someone else helping fill in the regex's
O could see it wasn't working as I use the plugin "WikiData for web" so could see it being misidentified which I proved-out using regex101
Happy to take another look, keep up the good work Back ache (talk) 07:53, 5 December 2023 (UTC)[reply]
I was wrong about the language code, which is not used as "sub-subdomain", but immediately before the "wiki/" part of the URL. So we actually need two statements, like this.
I've also added a further pattern for matching the remaining URLs specified in formatter URL (P1630) statements. --Horcrux (talk) 08:48, 5 December 2023 (UTC)[reply]
Unfortunately is still seeing it as a page :-(
13:01, 5 December 2023 (UTC) Back ache (talk) 13:01, 5 December 2023 (UTC)[reply]
@Back ache: May you be clearer about what you mean with "seeing it as a page"? May you upload a screenshot somewhere? --Horcrux (talk) 13:18, 5 December 2023 (UTC)[reply]
@Back ache: Ok, I think I got what you meant. The problem was that your tool was checking for a P6262-match before the P4073 one. With these edits I excluded "Main_Page" and "*anything*_Wiki" to be accepted as page names, so now you should manage to inspect the content of https://money-heist.fandom.com/wiki/Money_Heist_Wiki as you wished. --Horcrux (talk) 13:36, 5 December 2023 (UTC)[reply]
Just tried https://heroes-and-villain.fandom.com/wiki/Jordan_Kent (which should identify as a page) but is identifying just as the the "Fandom wiki ID" "heroes-and-villain"  :-( Back ache (talk) 13:26, 7 December 2023 (UTC)[reply]
That is a distinct problem, but I don't think is a good idea to force the pattern to work only for main pages or domain-only URLs just for make an external tool work (this should be fixed locally in the tool's code). --Horcrux (talk) 15:12, 7 December 2023 (UTC)[reply]
@Horcrux what is your tool or how are you using this pattern? – Shisma (talk) 08:31, 10 December 2023 (UTC)[reply]
@Shisma: I don't have any tool, this property should be general purpose, its values should not be adapted for specific tools. --Horcrux (talk) 10:54, 10 December 2023 (UTC)[reply]
agreed. I'm just trying to figure out how to best solve this– Shisma (talk) 11:20, 10 December 2023 (UTC)[reply]
@Shisma: Can't you solve it by your side by first checking whether there is a match for articles and then for wikis (I'm assuming we are still talking of the same problem)? --Horcrux (talk) 11:25, 10 December 2023 (UTC)[reply]
well currently, the order in which patterns are checked goes from short to long:
  1. Fandom wiki ID (P4073): ^https?:\/\/(?!community|www)([\w-]+)\.(?:fandom|wikia)\.com\/([a-z]+(?:-[a-z]+)?)\/wiki
  2. Fandom article ID (P6262): ^https?:\/\/([a-z0-9\.-]+)\.(?:fandom\.com|wikia\.org)\/([\w\-]+)\/wiki\/(?!Main_Page|.*_Wiki\b)([^\s#]+(?:\??$))
so Fandom wiki ID (P4073) machtes first. Also: after a positive match the search is over. And I would like to keep it this way for performance's sake.
Maybe we can express somehow, that Fandom article ID (P6262) is a more precise property 🤷 – Shisma (talk) 11:52, 10 December 2023 (UTC)[reply]
@Shisma: The point is that URLs are not identifiers per se, but may contain more identifiers. The URL https://heroes-and-villain.fandom.com/wiki/Jordan_Kent contains two identifiers, one for the wiki and one for the article, and I can't see any semantically-sound "preference" relation between them. IMHO this relation is strictly dependent to your use case, and can't be encoded in any generl-purpose property.
You may want to give a lower preference to proprerties that are instance of Wikidata property linking to homepages of external MediaWiki websites (Q121865054). --Horcrux (talk) 12:13, 10 December 2023 (UTC)[reply]
yah, something like that. But I think this class makes little sense. the property doesn't link anywhere. The Formatter url might do so. How about Wikidata property that represents a specific domain? – Shisma (talk) 12:30, 10 December 2023 (UTC)[reply]
Let's move here for this further topic :-) --Horcrux (talk) 13:24, 10 December 2023 (UTC)[reply]
I could also prefer Wikidata property linking to articles in MediaWiki websites (Q123667996) since I am assuming its more useful for my users. I think I'm going to do this – Shisma (talk) 12:44, 10 December 2023 (UTC)[reply]
I'm trying this out in version .331 Shisma (talk) 14:25, 10 December 2023 (UTC)[reply]