timthedevguy / BuySYS

*NO LONGER MAINTAINED* Buyback application for EveOnline, can be used by Corporations/Alliances or private entities. Written in PHP 7.4
10 stars 3 forks source link

Broken "spaces" for client -> box #32

Closed SkippTekk closed 3 years ago

SkippTekk commented 3 years ago

So, this hopefully can be added into the patch while you update it to PHP 8.

Issues: wrong "space" causes a 500 error.

-> <- this is the space that breaks it and turns into 500. Needs to manually change the spacing between the Item name and the number. https://gyazo.com/fa993e1e4109dede6ac04ff304aeaf8a don't care it shows my toon name.

timthedevguy commented 3 years ago

Interesting, that appears to be a tab, which should successfully work if it's pasted from game, but that doesn't look like a paste from game, where are you pasting from?

SkippTekk commented 3 years ago

Directly copy from game. To the website. And It breaks. I don't think it's a tab though.

On April 19, 2021 10:36:15 a.m. Tim Davis @.***> wrote:

Interesting, that appears to be a tab, which should successfully work if it's pasted from game, but that doesn't look like a paste from game, where are you pasting from? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

timthedevguy commented 3 years ago

SkippTekk,

Can you do me a favor, create a Gist, or pastebin or something with a copy paste from the game with an item that shows this behavior, I wanna see what this character actually is. If I copy and paste to notepad from here it's a single space, but if I do a page inspect in HTML it's 4 spaces which leads me to think it's a tab, but I could still be wrong.

SkippTekk commented 3 years ago

Cinnabar 24763 Chromite 35650 Lavish Chromite 22640

these are some of the items, it's from CCP directly.

Or a evepraisel link https://evepraisal.com/a/105sc8.raw

timthedevguy commented 3 years ago

Ok, does your instance break when you try those three items? It works on my copy using a direct copy paste from the raw link you provided

SkippTekk commented 3 years ago

Yes, it does break on our version of the application. But it always seem to be fixed when I manually replace the spaces. That's the only reason why it goes into error 500

timthedevguy commented 3 years ago

Ok, so I'm thinking your app is out of date, do an update. The 'spaces' are tabs, and I updated the Parser to recognize a 2 tab input back in Sept of 2020

SkippTekk commented 3 years ago

Alright. I'll throw this info to the IT group to see about getting it updated.

timthedevguy commented 3 years ago

The way the parser works is it attempts to find tabs, then if it finds them it counts how many, we know how many tabs are in each type of copy paste source (inventory, can, container, etc) so then we know how to parse the data. The reason replacing a tab with a space works is when you don't have tabs the system moves to spaces and tries to parse it that way. "[Item Name] [Item Quantity]". Prior to Sept 2020 the system didn't know where a 2 tab line comes from (example you provided) so it errors out. After the update it will work.

SkippTekk commented 3 years ago

Ok yes it's working! I just installed it for my own corp, and it's working as intended with the spaces. Thanks for fixing it :)