Content deleted Content added
m Archiving 2 discussion(s) from Template talk:Documentation) (bot |
m Archiving 1 discussion(s) from Template talk:Documentation) (bot |
||
Line 382:
:::::Ok, I've applied a fix to [[MediaWiki:Gadget-righteditlinks.css]]. It appears to be working in my tests, but let me know if you notice anything strange. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 03:41, 1 February 2014 (UTC)
:{{od|::::}}Thank you! That looks fine. – '''[[User:PartTimeGnome|PartTimeGnome]]''' <span style="font-size:79%">([[User talk:PartTimeGnome|talk]] | [[Special:Contributions/PartTimeGnome|contribs]])</span> 16:21, 1 February 2014 (UTC)
== Script error ==
[[Template:Infobox element]] is currently showing a script error indicating that "The time allocated for running scripts has expired." [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 16:37, 3 February 2014 (UTC)
:The problem appears to be in the <code>content</code> function – replacing the {{tlc|documentation}} on that template with {{tlc|<nowiki/>#invoke:documentation|content}} generates the same error when I preview the page.
:I'm not an expert on Lua scripts, but I think the problem is related to the <code>[[mw:Extension:Scribunto/Lua reference manual#frame:preprocess|frame:preprocess]]</code> call that reads the /doc page. {{abbr|AIUI|As I understand it}}, it causes the time taken to parse the /doc page to count as time used by the script. [[Template:Infobox element]] has a largish /doc page that transcludes a few complex templates, so it takes longer to parse and exceeds the limit on script execution time.
:The Scribunto documentation indicates <code>[[mw:Extension:Scribunto/Lua reference manual#frame:expandTemplate|frame:expandTemplate]]</code> is faster than <code>frame:preprocess</code> for expanding a single template. However, I'm not sure the speed improvement would be enough. [[User:Mr. Stradivarius|Mr. Stradivarius]], you've got more experience at this than me. Any ideas how we could handle this? Did I get anything wrong in my analysis? – '''[[User:PartTimeGnome|PartTimeGnome]]''' <span style="font-size:79%">([[User talk:PartTimeGnome|talk]] | [[Special:Contributions/PartTimeGnome|contribs]])</span> 21:58, 3 February 2014 (UTC)
::Nope, your analysis seems spot on. I've changed the module to use frame:expandTemplate instead of frame:preprocess, and now it shows the full doc page when used with <code><nowiki>{{#invoke:documentation|content}}</nowiki></code>. But it still isn't fast enough when using plain {{tl|documentation}}. Part of the reason is that it also needs to expand {{tl|pp-template}}, which is itself a fairly heavy template. I removed the navboxes from the bottom of the /doc page, and that did the trick. Frietjes' suggestion of removing {{tl|Periodic table}} from the navbox template would likely also work, as that template is pretty heavy too. If you don't want to remove anything from the /doc page, though, you could either use {{tl|documentation/old}}, which I've just copied from the pre-Lua {{tl|documentation}}, or you could convert some more of the templates on that page to Lua. {{tl|Periodic table}} seems the best target to me. Also, {{tl|pp-meta}} will probably be undergoing a rewrite soon, so that should speed things up. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 23:05, 3 February 2014 (UTC)
:::{{reply to|Mr. Stradivarius}} I now get a "Cannot find section" error when I try to edit any of the transcluded sections from the page transcluding the documentation. the links work fine from the /doc page, but not from the main template (e.g., clicking on a section edit link in [[template:Infobox dam]]). [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 15:23, 6 February 2014 (UTC)
::::Hmm... The links are trying to edit a section on the template itself, not the documentation. I think this might be a limitation/bug of Scribunto: when a Lua script expands a template, MediaWiki doesn't keep track of where the headings came from as it does for templates transcluded normally. This is possibly one for [[mw:Bugzilla|Bugzilla]]. – '''[[User:PartTimeGnome|PartTimeGnome]]''' <span style="font-size:79%">([[User talk:PartTimeGnome|talk]] | [[Special:Contributions/PartTimeGnome|contribs]])</span> 21:30, 6 February 2014 (UTC)
:::::Yes, this is a Scribunto bug, and will need to be fixed in the extension itself. Now that you post this here, I do remember reading about this bug somewhere before. I couldn't find it in Bugzilla when I looked just now, though. — '''''[[User:Mr. Stradivarius on tour|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius on tour</span>]]''''' <sup>[[User talk:Mr. Stradivarius on tour|♪ talk ♪]]</sup> 22:54, 6 February 2014 (UTC)
:::::Perhaps this is serious enough that we should revert back to the old template until it is fixed? — '''''[[User:Mr. Stradivarius on tour|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius on tour</span>]]''''' <sup>[[User talk:Mr. Stradivarius on tour|♪ talk ♪]]</sup> 23:03, 6 February 2014 (UTC)
::::::Aha, this bug doesn't occur when frame:preprocess is used, only frame:expandTemplate. I've reverted back to the frame:preprocess version, even though it may take some pages over the 10-second limit. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 04:46, 7 February 2014 (UTC)
:::::::I've found the Bugzilla bug - it's [[bugzilla:55525]], and has already been fixed. The fix should be live on Wikipedia on the 13th Feb, which is why it was still affecting us here. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 06:13, 7 February 2014 (UTC)
:{{od|::::::}}Good work, both to you and the developers! I did look for a bug last night, but wasn't able to find it. I was also worried we might be waiting a while for a fix; it's excellent to find it's already fixed! – '''[[User:PartTimeGnome|PartTimeGnome]]''' <span style="font-size:79%">([[User talk:PartTimeGnome|talk]] | [[Special:Contributions/PartTimeGnome|contribs]])</span> 21:05, 7 February 2014 (UTC)
|