VisualEditor: {{NAMESPACE}} not running in context so doesn't know what namespace you're in
Closed, ResolvedPublic

Description

See https://en.wikipedia.org/wiki/Template:Userspace draft - when rendered in the VE it displays the mainspace appropriate text regardless of what namespace it is in.


Version: unspecified
Severity: minor

By the time we get the template, the evaluation of the parser functions - in this case, {{NAMESPACE}} - has already been done (by Parsoid). In general, I believe that most parser functions are just "return true" at this point, and will be coming in future.

We pass in the title to the PHP preprocessor, so namespace-dependent parserfunctions should work as expected. Are you talking about Parsoid rendering or the VE's preview rendering after inserting a new template?

GWicke added a comment.Jul 2 2013, 1:24 AM

I'm guessing this is actually about newly inserted {{NAMESPACE}} calls:

http://www.mediawiki.org/wiki/User:GWicke/TestNamespace?veaction=edit

Reassigning to VE.

This was originally about the Parsoid issue, which is now fixed, but re-purposing to be about the DM re-render to PHP parser issue.

  • Bug 50582 has been marked as a duplicate of this bug. ***
jayvdb added a comment.Oct 7 2013, 1:29 AM

Is this fixed?

When I look at this page which uses [[template:userspace draft]]:

https://en.wikipedia.org/wiki/User:JohnArmagh/Heads_of_Government_of_the_State_of_Victoria,_Australia?veaction=edit

The appropriate message is shown.

However part of that box should render as
"This draft was last edited 13 months ago"
but in VE is renders as
This draft was last edited 1 second's time"

which means {{REVISIONTIMESTAMP}} isnt expanding correctly as, based on the future tense, it is giving a value that is CURRENTTIME+1..?

I think this was resolved in Gerrit change 127388

Add Comment