Dota 2 Wiki
(→‎Ability page styling: table positions)
No edit summary
Line 27: Line 27:
 
::::It shouldn't (TM) matter where on the page the cargo defintion is placed. The cargo data is stored in an external table anyway seperately from the main page. If it breaks during the first save attempt because of racing conditions, it may be fixed by re-saving the page. I actually had a case with SMW where the source data has been erased already, but two pages where supplying each other with cached data. It didn't break for a long time until I edited both at the same time........
 
::::It shouldn't (TM) matter where on the page the cargo defintion is placed. The cargo data is stored in an external table anyway seperately from the main page. If it breaks during the first save attempt because of racing conditions, it may be fixed by re-saving the page. I actually had a case with SMW where the source data has been erased already, but two pages where supplying each other with cached data. It didn't break for a long time until I edited both at the same time........
 
::::I'm more concerned about nested Cargo calls in general. If the pulled value is itself causing a cargo call, there's weird things going on. Didn't manage to pinpoint this down by now. If you don't get news from me within a week, spam me again on steam. [[User:Molldust|Molldust]] ([[User talk:Molldust|talk]]) 06:58, 12 January 2019 (UTC)
 
::::I'm more concerned about nested Cargo calls in general. If the pulled value is itself causing a cargo call, there's weird things going on. Didn't manage to pinpoint this down by now. If you don't get news from me within a week, spam me again on steam. [[User:Molldust|Molldust]] ([[User talk:Molldust|talk]]) 06:58, 12 January 2019 (UTC)
  +
:::::The main issue with the race condition is that it is causing the database to completely fail to save any data affected, if you see [[Template talk:Ability]] there's already a writeup on this. [[Special:CargoTables/Ability]] and [[Special:CargoTables/abilities_traits]] are the two tables affected. This is because at the time of saving Cargo empties the lines of the table that are being edited and then repopulates it. So you get <em>No Results</em> as one of the [[Template:Calc]] parameters if it uses talents because the parser hasn't reached talents yet and Cargo assumes that it is empty. If you move talents either A) Above the Abilities (which is pretty messy) or B) Into a new tab it will be fine. Nested Cargo calls are fine otherwise because Cargo doesn't complain if you query data from the same template. -- [[User:Sanhard|Sanhard]] ([[User talk:Sanhard|talk]]) 11:32, 12 January 2019 (UTC)

Revision as of 11:32, 12 January 2019

Ability page styling

What's the plan with the ability boxes being separated onto different pages? I want to redo Template:Ability wrapper to use Cargo instead of SMW because of the obvious reason...

Life Drain icon
▶️ Down the drain.
Semantic MediaWiki is deprecated.
Use Extension:Cargo instead.

It will be useful to know if all abilities are going to look like this in the future or if we will revert the few that are changed to this format? -- Sanhard (talk) 15:47, 10 January 2019 (UTC)

Honestly, I dunno. The Gamepedia people still want everything transferred to cargo, but they're not rushing it. These subpages are User:Litzsch's way of taking us off SMW. Not sure if it's a good idea or not, but it seems like the only way since Cargo won't let you query things from the same page..? If Gamepedia really presses us to remove SMW then I might have to ask some of their experts for help. - Lemoncake(talk) 21:28, 10 January 2019 (UTC)
The issue is caused not by querying things from the same page, but by attempting to query things on the page that the MediaWiki parser hasn't parsed yet. So there's a bunch of cargo errors from trying to reference the talents at the bottom of the page that aren't parsed yet, so it fills up the database with errors. If you declare the talents **before** the abilities, this problem will be solved. So you can have a page that looks like ==Abilities== {{Talent data | t1left = x | v1left = 20 | t2left = y | v2left = 30 }} //This draws nothing, just sets values //Abilities ==Talents== {{Talent data}} //This draws the talent table and this would have no more cargo problems and the page wouldn't visually change, you would just set the values a little above. Is User:Litzsch still around? His last edit was 3 months ago. --Sanhard (talk) 16:16, 11 January 2019 (UTC)
Actually, another idea is you can put the talents in the tabber in between Hero and Strategy and transclude them onto the page. Which would be a lot cleaner. -- Sanhard (talk) 16:19, 11 January 2019 (UTC)
Litzsch disappeared, but that's okay. I'm not good at this so let me ping User:Molldust and get his opinion on it. - Lemoncake(talk) 23:49, 11 January 2019 (UTC)
It shouldn't (TM) matter where on the page the cargo defintion is placed. The cargo data is stored in an external table anyway seperately from the main page. If it breaks during the first save attempt because of racing conditions, it may be fixed by re-saving the page. I actually had a case with SMW where the source data has been erased already, but two pages where supplying each other with cached data. It didn't break for a long time until I edited both at the same time........
I'm more concerned about nested Cargo calls in general. If the pulled value is itself causing a cargo call, there's weird things going on. Didn't manage to pinpoint this down by now. If you don't get news from me within a week, spam me again on steam. Molldust (talk) 06:58, 12 January 2019 (UTC)
The main issue with the race condition is that it is causing the database to completely fail to save any data affected, if you see Template talk:Ability there's already a writeup on this. Special:CargoTables/Ability and Special:CargoTables/abilities_traits are the two tables affected. This is because at the time of saving Cargo empties the lines of the table that are being edited and then repopulates it. So you get No Results as one of the Template:Calc parameters if it uses talents because the parser hasn't reached talents yet and Cargo assumes that it is empty. If you move talents either A) Above the Abilities (which is pretty messy) or B) Into a new tab it will be fine. Nested Cargo calls are fine otherwise because Cargo doesn't complain if you query data from the same template. -- Sanhard (talk) 11:32, 12 January 2019 (UTC)