Page MenuHomePhabricator

Boolean values in graph specs not behaving properly after a save in VE
Open, MediumPublic


When saving a page containing graphs in VE, any booleans set to true in graph specs will show up as either "" or null in mw.config.wgGraphSpecs, causing the graph to not render properly. Once you refresh the page though, booleans are fine.

Event Timeline

ferdbold raised the priority of this task from to Needs Triage.
ferdbold updated the task description. (Show Details)
ferdbold added a subscriber: ferdbold.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptNov 17 2015, 6:35 PM
ferdbold triaged this task as Medium priority.Nov 17 2015, 6:38 PM
ferdbold set Security to None.

T109645: Bar charts are not displaying properly directly after a save in VisualEditor worked around this in the VE graph code with a hack, but it'd be nice to fix this properly.

Yurik added a subscriber: Yurik.EditedDec 18 2015, 9:59 PM

Is this bug still happening? I don't see it -- I just went to and clicked "preview". After which, in the debugger, I highlighted the graph and copied the graph id from two levels up (for me it was c5f25fc7d889ecbf3e269db910893a93170d04ae ).
Afterwards, in the debugger I ran JSON.stringify(mw.config.get('wgGraphSpecs')['c5f25fc7d889ecbf3e269db910893a93170d04ae']) from the console - and I see that the graph contains both :true and :false, meaning that bools preserved ok.