Page MenuHomePhabricator

"Create calendar event" form has broken default date+time values, times out when trying to use date picker widget
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Firefox 49
  2. In the upper corner, click the plus and choose "Create Calendar Event"
  3. End up on https://phabricator.wikimedia.org/calendar/event/edit/form/25/
  4. Under "Start", see a text field (prefilled with // for everyone's confusion), the symbol, and a textfield
  5. Click the symbol

Expected results:
No // in first field but prefilled date.
No empty second field but prefilled time.
Some fancy form to choose a date. I guess.

Actual results:
Browser gets unresponsive; shows popup "Warning: Unrepsonsive script" after a while.
After clicking "Stop script", you can see a small wide line displayed, and see this output in the developer console:

Error: Script terminated by timeout at:
getValidDate@https://phab.wmfusercontent.org/res/contrastX/phabricator/568931f3/rsrc/js/core/behavior-fancy-datepicker.js:60:16
render_month@https://phab.wmfusercontent.org/res/contrastX/phabricator/568931f3/rsrc/js/core/behavior-fancy-datepicker.js:50:12
render@https://phab.wmfusercontent.org/res/contrastX/phabricator/568931f3/rsrc/js/core/behavior-fancy-datepicker.js:44:56
onopen@https://phab.wmfusercontent.org/res/contrastX/phabricator/568931f3/rsrc/js/core/behavior-fancy-datepicker.js:20:146
.statics.pass@https://phab.wmfusercontent.org/res/contrastX/phabricator/1d376fa9/core.pkg.js:152:54
.statics._dispatchProxy@https://phab.wmfusercontent.org/res/contrastX/phabricator/1d376fa9/core.pkg.js:147:294
.statics.dispatch@https://phab.wmfusercontent.org/res/contrastX/phabricator/1d376fa9/core.pkg.js:130:191
JX.__rawEventQueue@https://phab.wmfusercontent.org/res/contrastX/phabricator/3010e992/rsrc/externals/javelin/core/init.js:15:44
behavior-fancy-datepicker.js:60:16

Other comments:

Event Timeline

Aklapper updated the task description. (Show Details)
Aklapper renamed this task from Trying to use the date picker when trying to create a calendar event, browser hangs (unresponsive script) to "Create calendar event" form has broken default date+time values, times out when trying to use date picker widget.Oct 5 2016, 10:22 PM

After entering dates in format 2016-10-05 and entering a time (UTC) I also need to explicitly uncheck the "Repeat Until" checkbox even though I chose "Recurring: One-Time Event" otherwise I get an error...

I carn't reproduce this on https://phab-01.wmflabs.org/calendar/event/edit/form/default/ since that is using the latest version of phabricator we will be upgrading too tonight.

It seems to still be a problem after the update, I think it may be the form now.

@mmodell would you be able to check the form please?

I boldly went to "Edit Form Defaults", removed mmodell as default Invitee; removed "//" from the three date fields; unchecked the "Repeat Until" checkbox. That did not help, so I reverted it ("it" = mmodell as default invitee, in this case).

If you remove the // it works for me.

Mentioned in SAL (#wikimedia-operations) [2016-10-06T08:26:59Z] <twentyafterfour> Restarted apache on iridium to apply hotfix to phab calendar form. refs T147525

For the record: The problem is related to having a customized edit form. I'm not sure why customizing the defaults caused such a strange bug but I papered over it for now. I will report it upstream and maybe @epriestley has a better solution.