Last modified: 2014-08-19 18:52:56 UTC
If you try to add a new topic to http://flow-tests.wmflabs.org/wiki/Talk:Sandbox?debug=1 , preview works, but [Add topic] fails with JS error: TypeError: retval is null http://flow-tests.wmflabs.org/w/load.php?debug=false&lang=en&modules=ext.flow.editor%2Cnew%2Cparsoid%2Ctemplating%7Cext.flow.new.handlebars%2Chistory%7Cext.flow.vendor.jquery.ba-throttle-debounce%7Cext.flow.vendor.storer%7Cjquery.conditionalScroll&skin=vector&version=20140724T202329Z&* Line 133 This server is running latest labs-vagrant on Ubuntu 14.04 which uses HHVM. I think the api.php POST request is working differently than on ee-flow.wmflabs.org curl 'http://flow-tests.wmflabs.org/w/api.php' -H 'Host: flow-tests.wmflabs.org' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'X-Requested-With: XMLHttpRequest' -H 'Referer: http://flow-tests.wmflabs.org/wiki/Talk:Sandbox?debug=1' --data 'action=flow&format=json&submodule=new-topic&page=Talk%3ASandbox&ntreplyTo=rs59ohzgumpwtie0&nttopic=Please+stay+up+flow-tests!&ntcontent=&token=FOO'
The curl above returns {"error":{"code":"badtoken","info":"Invalid token"}} for me, is this problem reproduceable now?
in backlog: https://trello.com/c/BRoKbUsv
the token error is a different one, the actual response received is missing things on flow-tests, but i get them locally. I'll be poking this more today.
Change 150011 had a related patch set uploaded by EBernhardson: Fix wrong response from new-topic using redis https://gerrit.wikimedia.org/r/150011
This bug reappeared on beta labs. New topic appears to fail, nothing happens. In fact it succeeded, but there's an empty topic in the server response, and this cache (?) failure triggers JS errors from helpers that don't handle missing object keys. Browser tests creating a new post began failing no earlier than Weds 13 August 04:00 UTC and no later than Weds 13 August 18:13 UTC. So there's probably a redis cache issue again in the back-end, and on the front-end the JS should probably avoid failing. The JS failure is "retval is undefined" in FlowHandlebars.prototype.plaintextSnippet() in flow-handlebars.js Line 624. Avoid this and the next failure is "context.creator is undefined" in started_with_participants() in flow-handlebars.js Line 136, because context is only { content=null }. The function needs to test for context.creator and context.author. Avoid these JS errors and the [Add topic] form is replaced by a garbled topic: undefined started this topic Reply • undefined comments • 12/31/1969, 4:00:00 PM which is better than the form seeming to hang.
Change 154124 had a related patch set uploaded by EBernhardson: Repair beta labs https://gerrit.wikimedia.org/r/154124
Change 154124 had a related patch set uploaded by Jdlrobson: Repair beta labs https://gerrit.wikimedia.org/r/154124
Change 154124 merged by jenkins-bot: Repair beta labs https://gerrit.wikimedia.org/r/154124
Now there are no more JS errors to the console, but it still doesn't work. Now on beta labs I usually see the top-most topic displayed twice, but *not* my new topic. What's happening is the server response doesn't include your new topic, and JS takes the 0 topic assuming it's your newly-written topic, and renders that.
Change 154955 had a related patch set uploaded by EBernhardson: Override requests for DB_SLAVE when submitting new content https://gerrit.wikimedia.org/r/154955
Change 154955 merged by jenkins-bot: Override requests for DB_SLAVE when submitting new content https://gerrit.wikimedia.org/r/154955
Seems fixed!