Last modified: 2014-08-19 18:52:56 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 T70531, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68531 - Flow: New post on flow-test labs-vagrant server fails
Flow: New post on flow-test labs-vagrant server fails
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Flow (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
: hhvm
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-24 20:39 UTC by spage
Modified: 2014-08-19 18:52 UTC (History)
6 users (show)

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


Attachments

Description spage 2014-07-24 20:39:48 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'
Comment 1 Max Semenik 2014-07-25 17:53:26 UTC
The curl above returns {"error":{"code":"badtoken","info":"Invalid token"}} for me, is this problem reproduceable now?
Comment 2 Danny Horn 2014-07-25 18:12:27 UTC
in backlog: https://trello.com/c/BRoKbUsv
Comment 3 Erik Bernhardson 2014-07-28 17:26:29 UTC
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.
Comment 4 Gerrit Notification Bot 2014-07-28 20:11:22 UTC
Change 150011 had a related patch set uploaded by EBernhardson:
Fix wrong response from new-topic using redis

https://gerrit.wikimedia.org/r/150011
Comment 5 spage 2014-08-14 01:51:24 UTC
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.
Comment 6 Gerrit Notification Bot 2014-08-14 20:00:58 UTC
Change 154124 had a related patch set uploaded by EBernhardson:
Repair beta labs

https://gerrit.wikimedia.org/r/154124
Comment 7 Gerrit Notification Bot 2014-08-14 21:24:37 UTC
Change 154124 had a related patch set uploaded by Jdlrobson:
Repair beta labs

https://gerrit.wikimedia.org/r/154124
Comment 8 Gerrit Notification Bot 2014-08-14 23:27:28 UTC
Change 154124 merged by jenkins-bot:
Repair beta labs

https://gerrit.wikimedia.org/r/154124
Comment 9 spage 2014-08-18 20:24:07 UTC
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.
Comment 10 Gerrit Notification Bot 2014-08-18 22:17:24 UTC
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
Comment 11 Gerrit Notification Bot 2014-08-19 17:19:30 UTC
Change 154955 merged by jenkins-bot:
Override requests for DB_SLAVE when submitting new content

https://gerrit.wikimedia.org/r/154955
Comment 12 spage 2014-08-19 18:52:56 UTC
Seems fixed!

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


Navigation
Links