Page MenuHomePhabricator

Graph does not appear in Read mode after saving the page
Closed, ResolvedPublic1 Estimated Story Points

Description

Insert a graph node
Save the page

Observe that, the graph is not appearing in the readmode

Event Timeline

Ryasmeen raised the priority of this task from to Needs Triage.
Ryasmeen updated the task description. (Show Details)
Ryasmeen added a project: VisualEditor.
Ryasmeen subscribed.
Ryasmeen renamed this task from Graph does not appears in Read mode after saving the page to Graph does not appear in Read mode after saving the page.Nov 17 2015, 7:40 PM
Ryasmeen added a project: Graph-VisualEditor.
Ryasmeen set Security to None.

Is this happening with bar graphs? We pushed a fix this morning that fixes this kind of issue
T109645: Bar charts are not displaying properly directly after a save in VisualEditor

For me it happened with area graph and line graph too. I will check again after that fix is merged.

I checked this now in Beta cluster and its merged but the issue is not resolved yet.

Jdforrester-WMF moved this task from To Triage to Blocked on the VisualEditor board.
Jdforrester-WMF edited a custom field.

Update: This is due to a clash between assumptions that both VE and the Graph extension makes on what the page data is. On a save from VE, the HTML presented to the user is not actually rerendered from the server, but rather served by VE through Parsoid.

The problem is that the Graph extension only works on server and renders the graphs only on PHP hooks, so that when VE saves a page, Graph has no way of knowing that the page actually has *new* graphs, since no new request has been made to the server.

Previously this worked because the graph extension exposed some properties in mw.config that we could use, but for some reason these properties are not exposed anymore in production (they still are in my local MW installation, though, which is why I hadn't noticed that bug). We will probably have to make some tweaks to the graph extension itself (not just the VE side of it) to make this more stable in the future.

I'm not seeing this happen anymore (graphs are regenerated by Graphoid fine on a VE save on mediawiki.org), so closing this.