vihanb / PPCG-Design

A redesign of the PPCG website
codegolf.stackexchange.com
35 stars 14 forks source link

Challenges of the day... not working? #132

Closed ArthaTi closed 6 years ago

ArthaTi commented 6 years ago

Looks like, at least for me, challenges of the day don't really work as expected: They don't change. It's said that these are daily ones, right? They didn't seem to change for me since installation of the script.

code-golf   Regex that only matches itself
code-challenge  I need a program where the user inputs an array of doubles and the program outputs the array sorted
math    Little Chandler is sad. Draw him a cloud to cheer him up
graphical-output    Square, Circle, Triangle, ...Gear?
interpreter Write an interpreter for my esoteric language Jumper

Everyday there are these. They don't change, even if they should, as they are "challenges of the day"

RikerW commented 6 years ago

Challenges of the day is broken, it's definitely the goat's fault. They've been broken for a while now?

RikerW commented 6 years ago

I'll work on it but hey if it gets the goat to do it I'm assigning him (in the meantime, I'll comment out that userscript section)

vihanb commented 6 years ago

@RikerW ಠ_ಠ I didn't even write the related code

vihanb commented 6 years ago

@JJ-Atkinson could you take a look at this

vihanb commented 6 years ago

Basic investigation leads to here: https://github.com/vihanb/PPCG-Design/blob/master/ppcg.user.js#L1171 @Soaku what browser/userscript engine are you using?

JJ-Atkinson commented 6 years ago

Hello, long time no see ;)

I can try to fix it on Sunday or Monday. Not this week. Last I checked it was working ok, so I don't know what went wrong.

ArthaTi commented 6 years ago

@vihanb Chrome, pu64.0.3282.186, 64-bit

JJ-Atkinson commented 6 years ago

@vihanb A problem I see now is that SE updated their site. When I updated the settings pane I made it depend on css that only seems to be present https://codegolf.stackexchange.com/users/preferences/me. Is the settings pane unstyled for you as well?

JJ-Atkinson commented 6 years ago

I think I found the problem. https://github.com/vihanb/PPCG-Design/pull/133

ArthaTi commented 6 years ago

Updated the script and QOTD changed!

If it will work tomorrow, then this issue can be closed, I think

ArthaTi commented 6 years ago

Ok, ~it's actually working!~ Challenges are changed every refresh, not every day. 😕

On the side, I'm suggesting to filter out questions tagged with [tips], because these aren't challenges.

Challenges of the Day
code-golf   Tips for golfing in Python
JJ-Atkinson commented 6 years ago

@Soaku When is it actually updating? It should update when the last update day of the month is not the same as they current day of the month (almost certianly the same as every day). To filter out questions tagged [tips], you would need to edit the query on line https://github.com/vihanb/PPCG-Design/blob/master/ppcg.user.js#L1211.

ArthaTi commented 6 years ago

@JJ-Atkinson It is updating every page refresh.

From console:

adding question of the day
last QOD Update 11 ; today 11
Array(11)
data to remove Array(8)
done adding question of the day

Update 11 ; today 11 and then data to remove Array(8)? Looks suspicious.

JJ-Atkinson commented 6 years ago

@Soaku I think it's fixed now.

ArthaTi commented 6 years ago

@JJ-Atkinson Alright, it doesn't seem to change per refresh now. If it will work tomorrow, then it is fixed.

JJ-Atkinson commented 6 years ago

@Soaku Did it work? I'm not on the site often anymore.

ArthaTi commented 6 years ago

@JJ-Atkinson Yes, it does.