Property talk:P4073
Documentation
identifier of a topic's wiki, in Fandom.com
Represents | Fandom wiki (Q106513246) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Associated item | Fandom (Q17459) | ||||||||||||
Applicable "stated in" value | Fandom (Q17459) | ||||||||||||
Data type | External identifier | ||||||||||||
Domain | popular media topics (note: this should be moved to the property statements) | ||||||||||||
Allowed values | ([a-z]{2,}(?:-[a-z]+)?\.)?[a-z0-9]+(-[a-z0-9]+)* | ||||||||||||
Example | The 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:
When possible, data should only be stored as statementsGlobal Sitemap | ||||||||||||
Formatter URL | https://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: usage | Category:Pages using Wikidata property P4073 (Q59843764) | ||||||||||||
See also | Fandom article ID (P6262), Gamepedia wiki ID (P6867), wiki.gg wiki ID (P11994), official wiki URL (P12203) | ||||||||||||
Lists |
| ||||||||||||
Proposal discussion | Proposal discussion | ||||||||||||
Current uses |
| ||||||||||||
Search for values |
List of violations of this constraint: Database reports/Constraint violations/P4073#Unique value, SPARQL (every item), SPARQL (by value)
([a-z]{2,}(?:-[a-z]+)?\.)?[a-z0-9]+(-[a-z0-9]+)*
”: value must be formatted using this pattern (PCRE syntax). (Help)List of violations of this constraint: Database reports/Constraint violations/P4073#Format, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P4073#allowed qualifiers, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P4073#mandatory qualifier, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P4073#Entity types
List of violations of this constraint: Database reports/Constraint violations/P4073#Scope, SPARQL
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)
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)
@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)
- 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)
- @Back ache: I think there are some mistakes here:
- 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). - 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. - 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]+)?\.)?
.
- It is immediate to verify that a regex like
- 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)- 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)
- 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)
- Unfortunately is still seeing it as a page :-(
- 13:01, 5 December 2023 (UTC) Back ache (talk) 13:01, 5 December 2023 (UTC)
- @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)
- @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)
- 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)
- 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)
- @Horcrux what is your tool or how are you using this pattern? – Shisma (talk) 08:31, 10 December 2023 (UTC)
- @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)
- agreed. I'm just trying to figure out how to best solve this– Shisma (talk) 11:20, 10 December 2023 (UTC)
- @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)
- well currently, the order in which patterns are checked goes from short to long:
- Fandom wiki ID (P4073):
^https?:\/\/(?!community|www)([\w-]+)\.(?:fandom|wikia)\.com\/([a-z]+(?:-[a-z]+)?)\/wiki
- Fandom article ID (P6262):
^https?:\/\/([a-z0-9\.-]+)\.(?:fandom\.com|wikia\.org)\/([\w\-]+)\/wiki\/(?!Main_Page|.*_Wiki\b)([^\s#]+(?:\??$))
- Fandom wiki ID (P4073):
- 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)
- @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)
- 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)
- Let's move here for this further topic :-) --Horcrux (talk) 13:24, 10 December 2023 (UTC)
- 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)
- I'm trying this out in version
.331
Shisma (talk) 14:25, 10 December 2023 (UTC)
- I'm trying this out in version
- 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)
- well currently, the order in which patterns are checked goes from short to long:
- @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)
- agreed. I'm just trying to figure out how to best solve this– Shisma (talk) 11:20, 10 December 2023 (UTC)
- @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)
- @Horcrux what is your tool or how are you using this pattern? – Shisma (talk) 08:31, 10 December 2023 (UTC)
- 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)
- 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)
- @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)
- @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)
- @Back ache: I think there are some mistakes here:
- All Properties
- Properties with external-id-datatype
- Properties used on 1000+ items
- Properties with unique value constraints
- Properties with format constraints
- Properties with qualifiers constraints
- Properties with required qualifiers constraints
- Properties with entity type constraints
- Properties with scope constraints
- Properties with conflicts with constraints