bug in the "Entry Browser"
BotB Academy Bug Reports and Feature Requests
 
 
170164
Level 29 Chipist
nitrofurano
 
 
 
post #170164 :: 2023.04.27 2:36am
  
  puke7 and null1024 liēkd this
when accessing https://battleofthebits.com/barracks/Profile/[whatever_username_here]/Browser , and when choosing a specific format from those icons, they only appear for a fraction of a second, and then the webpage looks like getting refreshed and lists entries from all formats instead

(i guess more people here noticed it?)
 
 
170171
Level 29 Hostist
puke7
 
 
 
post #170171 :: 2023.04.27 8:05am
  
  nitrofurano liēkd this
yikes -- how long has that been going on?
looks like the whole page is reloading after doing the ajax stuff
 
 
170172
Level 29 Chipist
nitrofurano
 
 
 
post #170172 :: 2023.04.27 8:30am
i think i noticed it weeks ago, i'm not sure
(i was falling asleep when i noticed it and totally forgot about...)
 
 
170173
Level 28 XHBist
Tex
 
 
 
post #170173 :: 2023.04.27 8:36am :: edit 2023.04.27 8:38am
  
  Chepaki liēkd this
Ohh you fixed it.

And yeah, this was an issue for a while. Possibly for months iirc. It didn't occur to me to report it for some reason.
 
 
170175
Level 29 Hostist
puke7
 
 
 
post #170175 :: 2023.04.27 9:13am
  
  VirtualMan and nitrofurano liēkd this
I haven't done anything yet! :D
 
 
170180
Level 28 Mixist
argarak
 
 
 
post #170180 :: 2023.04.27 2:34pm
  
  puke7, Baron Knoxburry, VirtualMan and nitrofurano liēkd this
i looked at this bug a while ago but then forgot and got distracted with other stuff oops

basically what's happening is that entry_browser.init (L15 in browser.js) is called twice. the first time is on profile page load because it runs when the script is loaded, with the call right at the bottom of browser.js and the second time is when the browser HTML is loaded via AJAX. this part:

<script>
entry_browser.init();
entry_browser.update();
</script>


runs init again which creates double the click events, one that toggles the format filter on, and the other toggles it off instantly. this behaviour only applies when the user loads the profile page first, then clicks on the browser. if you directly load the browser page (or refresh, same thing) it works. however, it only works because that script tag is run before the browser script is actually loaded causing "Uncaught TypeError: entry_browser.init is not a function". so basically it only works because this bug made it so.

in the profile page to browser page case, the script is already loaded so the browser events are just loaded twice. i just suggest removing that script tag from the browser HTML template and things should work again
 
 
170181
Level 25 Chipist
Quirby64
 
 
 
post #170181 :: 2023.04.27 2:38pm
  
  nitrofurano liēkd this
i experienced this months ago when looking at entries in my profile and disregarded it - i should have connected the dots this is a long term issue O_O
 
 
170188
Level 21 Mixist
Chepaki
 
 
 
post #170188 :: 2023.04.28 12:24am
  
  nitrofurano liēkd this
same thing as everyone, just thought someone probably already reported it hahaha............. oops
 
 
170220
Level 28 Chipist
null1024
 
 
 
post #170220 :: 2023.04.28 8:06pm
I've noticed it happening recently. I have no idea how long it's been going on, but I was looking for a particular entry a few days ago and got hit with the bug.
 
 
170289
Level 29 Hostist
puke7
 
 
 
post #170289 :: 2023.05.01 8:01pm :: edit 2023.05.01 8:02pm
  
  Chepaki, nitrofurano, argarak, damifortune and kleeder liēkd this
I think things are fixed now. I had to move a chunk of code from init() to update() in order for the direct botbr browsing loads to work. The main entry browser was broke for about a day because of this, but that's fixed now too. Also the `loadbar` wasn't showing during the ajax calls because I did something weird I don't remember why with the .hidden class being !important in the main palette.css

Special thanks to argarak for the analysis!

Lemme know if y'all find any other issues!
 
 
170312
Level 29 Chipist
nitrofurano
 
 
 
post #170312 :: 2023.05.02 11:07am
  
  puke7 liēkd this
working fine now! thanks! :)
 
 

LOGIN or REGISTER to add your own comments!