General Info
When attempting to expand/minimize a checklist, the item briefly turns blank, and blue, then an error appears "Task not found". (I can edit the task, other than the due date?) It then reverts back to the old task, with no expansion/
At top when loading page:
Deprecation warning: moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/
Arguments:
Error
at s.zone (https://habitica.com/app-6f837680.js:43:12297)
at Object.authenticate (https://habitica.com/app-6f837680.js:47:3855)
at Object.
at Object.i as invoke
at Object.c as $get
at Object.i as invoke
at https://habitica.com/app-6f837680.js:7:15171
at g (https://habitica.com/app-6f837680.js:7:16758)
at Object.i as invoke
at D.instance (https://habitica.com/app-6f837680.js:8:8733)
When clicked:
app-6f837680.js:8 PUT https://habitica.com/api/v3/tasks/undefined?userV=9701 404 (Not Found)(anonymous function) @ app-6f837680.js:8s @ app-6f837680.js:8f @ app-6f837680.js:8j @ app-6f837680.js:9(anonymous function) @ app-6f837680.js:9$eval @ app-6f837680.js:9$digest @ app-6f837680.js:9$apply @ app-6f837680.js:9(anonymous function) @ app-6f837680.js:10dispatch @ app-6f837680.js:4r.handle @ app-6f837680.js:4
app-6f837680.js:8 XHR finished loading: PUT "https://habitica.com/api/v3/tasks/undefined?userV=9701".(anonymous function) @ app-6f837680.js:8s @ app-6f837680.js:8f @ app-6f837680.js:8j @ app-6f837680.js:9(anonymous function) @ app-6f837680.js:9$eval @ app-6f837680.js:9$digest @ app-6f837680.js:9$apply @ app-6f837680.js:9(anonymous function) @ app-6f837680.js:10dispatch @ app-6f837680.js:4r.handle @ app-6f837680.js:4
app-6f837680.js:8 XHR finished loading: GET "https://habitica.com/api/v3/user/?userV=9701".(anonymous function) @ app-6f837680.js:8s @ app-6f837680.js:8f @ app-6f837680.js:8j @ app-6f837680.js:9(anonymous function) @ app-6f837680.js:9$eval @ app-6f837680.js:9$digest @ app-6f837680.js:9$apply @ app-6f837680.js:9s @ app-6f837680.js:8v @ app-6f837680.js:8a @ app-6f837680.js:8
app-6f837680.js:8 XHR finished loading: GET "https://habitica.com/api/v3/tasks/user?userV=9701".(anonymous function) @ app-6f837680.js:8s @ app-6f837680.js:8f @ app-6f837680.js:8j @ app-6f837680.js:9(anonymous function) @ app-6f837680.js:9$eval @ app-6f837680.js:9$digest @ app-6f837680.js:9$apply @ app-6f837680.js:9s @ app-6f837680.js:8v @ app-6f837680.js:8a @ app-6f837680.js:8
Habitica admins are working on this.
@Alys Oh, thanks! Sorry I didn't see it in current issues.
No, it's great that you logged it! I was about to thank you in the Bug guild. :) I posted that so that other contributors know that it's already being worked on. Sorry, I really should have made that clear!!
@Alys Yeah I saw it in there you asked someone to post, so I decided to do so. I wish I could help with all this stuff, I love this site :). Okay, issue only, not chat, I'll hush~ ;)
This has been addressed in production by reverting @Hus274's task editing fix. Refresh the page and the behavior should be repaired. But we'll need to do some more work to figure out how to get the task edit fix without these unfortunate side effects! So I'm not going to close this right away.
@SabreCat What is the issue with task editing? (Just so I don't report that inadvertently too :P)
@EternisRequiem: If you start editing a task, then cancel (by clicking the X icon), the task still looks like it's been edited until you sync again.
So looking at the code this has to be happening here which means that the user is saving the task when task._edit is undefined.
I'm trying to think of how the task could be opened for editing without setting that property. Refresh and sync both seem to close the tasks that are open for editing so that shouldn't cause it.
Oh! Maybe it's from the stay open functionality? If the user saves a task but stayOpen is set to true, then task._edit will be undefined, which causes this error, and the task would still be open for editing so the user could click save again to cause this. I don't know how to trigger the stayOpen functionality from the ui though or if it's even possible.
Sorry about this everyone! :(
@Hus274: If you click the checklist expand/collapse badge, you'll save the task (to toggle the checklist state) without opening it for editing, regardless of the stay-open feature.
I had no idea that you could click that, didn't even know that feature existed. Ok, I can look into fixing the original commit so this doesn't break it.
@Hus274: It might be as simple as doing
if (task._edit) angular.copy(task._edit, task);
in /website/client/js/controllers/tasksCtrl.js. That seemed to work for me on a quick test!
@SabreCat yeah that's what I was thinking as well, I just wish I would've known that functionality was there earlier!
The client redesign will have comprehensive test coverage, so issues like this should be easier to fix before they're deployed.
Most helpful comment
The client redesign will have comprehensive test coverage, so issues like this should be easier to fix before they're deployed.