nicho92 / MtgDesktopCompanion

Cards manager for magic the gathering
Apache License 2.0
163 stars 35 forks source link

Web UI Server error #176

Closed JulienSambre closed 3 years ago

JulienSambre commented 3 years ago

Hi!

When using the web ui server, I am able to see the list of decks that I have import in MtgDesktopCompanion, but when I click on the deck, the fields are empty. The root cause seems a call to the json backend which respond 500 :

image

image

JulienSambre commented 3 years ago

Find the bug : it works when there is no space in the name of the deck ("Merfolk" for example) and the page bug when it has space in the name of the deck ("Abzan Dina Sisters" for example).

I found out that if I fix the URL manually "/pages/deck.html?name=Abzan Dina Sisters" -> "/pages/deck.html?name=Abzan_Dina_Sisters" it fix the problem.

JulienSambre commented 3 years ago

More precisely : when you add a new deckto MtgDesktopCompanion, it saves the deck's name with space, but save the json file with "_" in the filesystem.

Then, Web UI can't find the right file (it search a file with space, like the logical deck name). If you replace the json filename with the logical one (with space), it works.

I think it should save somewhere a link between the logical name of the deck and the technical one.

nicho92 commented 3 years ago

Hi Julien,

Next release (2.26) will fix it by removing the file storage of decks. I'll store them in the selected database. More secure .

On Wed, Jul 28, 2021 at 10:59 AM JulienSambre @.***> wrote:

More precisely : when you add a new deckto MtgDesktopCompanion, it saves the deck's name with space, but save the json file with "_" in the filesystem.

Then, Web UI can't find the right file (it search a file with space, like the logical deck name). If you replace the json filename with the logical one (with space), it works.

I think it should save somewhere a link between the logical name of the deck and the technical one.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nicho92/MtgDesktopCompanion/issues/176#issuecomment-888139446, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXZPH4FUZZ7FIONJLWQ4UTTZ7BHJANCNFSM5BBXPLAA .

JulienSambre commented 3 years ago

Nice! Thanks :).