Last modified: 2011-04-14 15:13:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T24135, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22135 - template testing option
template testing option
Status: NEW
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-17 18:58 UTC by Stmrlbs
Modified: 2011-04-14 15:13 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Stmrlbs 2010-01-17 18:58:02 UTC
It would help testing of heavily used templates if there was an option that a group of users testing the new template could turn on in their preferences, so that the wikipedia software would check the user space specified in this option FIRST for any template called, then look in the regular template area.  

This would ease testing of templates, in that a user could turn this option on, and any page that was displayed would call in the test template instead of the "public" template.  With this option, a group of users would not have to have a group of "dummied" up examples to test - they could easily test a heavily used template for days, and more easily find problems, because they would be easily be able to test the template on a wide variety of existing Wikipedia pages without changing any of those pages.

The way the software pulled in templates would only be affected for those users with this option on.  No one else would see the tested template.  Then when the testing group was satisfied, they would agree to have the template moved to the main template area and they would turn off the testing option in their preferences.

This is something that is commonly done in other systems for the same reason - to allow a group of users to test new programs/templates.  It would be equivalent to having certain users call in a "test concatenation" to test macros in assembler language, or defining a testing path with test libraries in front for Perl (http://perldoc.perl.org/lib.html)
Comment 1 Max Semenik 2010-01-17 19:11:33 UTC
I don't think that this feature will be implemented. When you browse pages, you see cached HTML, rendered on save an re-rendered on hits once in a while. Parsing a page and rendering it is a slow process and can take up to 10 seconds. You're proposing to re-parse everything on each pageview of some users. Not only that will make browsing speed intolerable for them, but it will also increase server load. Your proposal will also significantly increase read load on database because every template has to be checked for copies in userspace.
Comment 2 Platonides 2010-01-17 19:13:10 UTC
Not necessarily. It could be available as a fourth button "Preview with my templates".
Comment 3 Stmrlbs 2010-01-17 19:41:08 UTC
at this time, there is an option to disable caching in the preferences for any user that wants to: Appearance/Advanced Options/Disable page caching.      There is also an option for purging cache as a function tab in the User Interface Gadgets (Add a "*" tab to the top of the page, which purges the page's cache when followed.)  Since these are options available to any user now, I don't think the cache issue should be a deciding factor to enable an option that would ease the testing of templates.  
Comment 4 Max Semenik 2010-01-17 19:53:21 UTC
(In reply to comment #3)
> at this time, there is an option to disable caching in the preferences for any
> user that wants to: Appearance/Advanced Options/Disable page caching.

You misunderstand what that option means. It just disables client-side caching, but doesn't re-parse wikitext on every page view.
Comment 5 Stmrlbs 2010-01-17 20:05:48 UTC
I had in mind an option in Preferences that would look like this:
(*) Template Test Mode - from (specify template test area):
[[User:Stmrlbs/xxx]] 

When the software came across a template "aaaaa", if a user had this option
turned on, for this user, the software would first check if
[[User:Stmrlbs/xxx/aaaaa]] existed, and use this for the template.  If
[[User:Stmrlbs/xxx/aaaaa]] did not exist, then the wikipedia software would
then use [[Template:aaaaa]]

This would facilitate the testing of heavily used templates, because a group
project could create a group of pages calling the heavily used template in many
various ways, and call up those pages with this option turned on to test a new
template, without needing to dummy up examples. 

It would also facilitate testing changes to inner templates, because a user
would no longer need to dummy up an outer template to call the modified inner
template.

~~~~
Comment 6 Stmrlbs 2010-01-17 20:13:42 UTC
why would it reparse on every page view?  Wouldn't it only reparse those pages that actually called the test template?  And only for those users that had that option turned on?
Comment 7 Stmrlbs 2010-01-17 20:17:01 UTC
Platonides said "Not necessarily. It could be available as a fourth button "Preview with my templates"."  
Actually.. this would be better than what I'm proposing.  That way, a user could display the page with templates in one window/tab, then display the same page with the public template in another window/tab.  Thanks.  Good suggestion.    
Comment 8 Bawolff (Brian Wolff) 2010-01-18 03:00:07 UTC
Perhaps this would be something better implemented as a js gadget. ( get page source, prefix all template calls with User:foo/ , render using api's action=parse).
Comment 9 Stmrlbs 2010-01-18 04:01:14 UTC
I see what Max is saying.  my bad.   
Comment 10 David Göthberg 2010-01-19 08:37:28 UTC
Bawolff: This can't be solved with javascript, since javascript don't see the meta-templates and sub-templates called from the templates on the page. Meta-templates can be many steps away from the templates we see in the page code. And testing meta-templates is when we most would need this "test mode".

However, I have figured out how to do this with only template code (albeit slightly less convenient). See http://en.wikipedia.org/wiki/User_talk:Davidgothberg#Proposed_enhancement_for_testing_templates
. I will implement this as the {{test-template}} at the English Wikipedia.
Comment 11 Bawolff (Brian Wolff) 2010-01-19 12:07:26 UTC
Your correct, the js solution i proposed would only work with the templates that are directly transcluded. (I forgot how dependant wikipedia was on meta templates).

As for {{test-template}}. Thats quite an ingenious use (abuse?) of template syntax. :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links