duckduckgo / zeroclickinfo-spice

DuckDuckGo Instant Answers based on JavaScript (JSON) APIs
https://duckduckhack.com/
Other
548 stars 942 forks source link

Stopwatch - doesn't work in duckpan server #914

Closed mintsoft closed 10 years ago

mintsoft commented 10 years ago

Yo,

Not sure if I'm doing something wrong, but "stopwatch" just doesn't work:

image

moollaza commented 10 years ago

@mintsoft after a quick check I believe the problem is that the code for the stopwatch is being executed before Duckpan has had a chance to compile the templates, so the template doesn't exist when stopwatch.js is looking for it.

I'll look into this a bit further...

mintsoft commented 10 years ago

@moollaza cool thanks, I seem to have similiar issues with my timer, however it's just copied from this

moollaza commented 10 years ago

@mintsoft I've made a tentative fix (pr to follow I guess) on a branch of Duckpan: https://github.com/duckduckgo/p5-app-duckpan/tree/zaahir/temp-calltype-self-fix

Feel free to git checkout the branch and the run duckpan install. It's a pretty big hack so I'm not happy about the fix but it works for now...

moollaza commented 10 years ago

Oh, also run duckpan upgrade or just rm -rf ~/.duckpan/cach to kill the cache. That way the updated duckpan.js from /share will get copied into the duckpan cache

mattr555 commented 10 years ago

Yeah, I had this issue when I was developing stopwatch, where call_type => 'self' wouldn't work. I was told at the time to just send a request to httpbin, and then change it to call_type self when we merge. To have call_type self working in DuckPAN would be great :+1:

mintsoft commented 10 years ago

@mattr555 Indeed! It shafted me when I was trying to make a countdown timer spice (which you've already finished!) wasted hours on this!

moollaza commented 10 years ago

@mattr555 @mintsoft my temp fix PR has been merged and released so you guys should be okay to work on pure JS Spices for now in DuckPAN. We plan on handling these types of Spices better so stay tuned!