Log In
Grass Weather Castform Don't have an account yet? Register now!
.

Forum Thread

Daycare bug

Forum-Index Bug Reports Resolved Daycare bug
Hollidaze
OFFLINE
Trainerlevel: 20

Forum Posts: 42
Posted: Tue, 10/04/2018 08:09 (6 Years ago)
In the daycare, I've found that if, you remove a Pokemon and immediately return it, the pokemon will be both returned and removed again by the time the page reloads. Both notifications pop up. It will continue to repeat with that no matter how many times you try to readd it to the daycare. You have to leave the daycare to readd the Pokemon.
SwampFall
OFFLINE
Trainerlevel: 59

Forum Posts: 601
Posted: Wed, 02/05/2018 02:12 (6 Years ago)
At the moment if you remove a pkmn you go to
http://pokeheroes.com/daycare?rem=17151853
Then when you add a pkmn it sends the data to the current link, so the one above. Since this is the link to remove the pkmn it removes it again.

Fix #1 (Better fix, you shouldn't remove stuff with a GET request)
Page:
daycare

Currently:
There's a link when you click it, it removes the pkmn from the daycare with following code
<a onclick="location.href = "?rem=17151853";" ... > ... </a>

Proposed code:
<a onclick="function() {$.post("/daycare", {rem: 17151853}); location.reload();}" ... > ... </a>

Note:
Server side should be changed to work with POST variables instead of GET variables.

Fix #2
Page:
daycare

Currently:
There's a form for selecting a pkmn:
<form method="post" ... > ... </form>

Proposed code:
<form method="post" action="/daycare" ... > ... </form>

Note:
This will probably be hard to implement since the form is part of the pkmn picker which is used over multiple pages.
Riako
OFFLINE
Trainerlevel: 70

Forum Posts: 2,759
Posted: Tue, 14/08/2018 14:04 (6 Years ago)
Fixed!