mtasa-resources icon indicating copy to clipboard operation
mtasa-resources copied to clipboard

elementbrowser is broken

Open stoneage-mta opened this issue 3 years ago • 4 comments

Which resource(s) have this problem?

elementbrowser

To Reproduce

1 - start the elementbrowser resource 2 - open http://server_ip:http_port 3 - select the "Element browser" menu option

Expected behavior

it should work 😄

Screenshots

image image

Version

MTA:SA Server 1.5.9-release-21048

Additional context

I haven't checked the code, but I belive its the same thing @ArranTuna fixed in this commit

stoneage-mta avatar Feb 11 '22 04:02 stoneage-mta

After looking at the javascript, I have no idea how to fix it, the script is barely understandable to me.

ArranTuna avatar Feb 11 '22 16:02 ArranTuna

It was broken by the changes to json.js during webmap upgrade: [web]/ajax/json.js

I haven't investigated if it's caused by some specific line but if you use old version of this file, the elementbrowser works.

4O4 avatar Apr 04 '22 15:04 4O4

@patrikjuvonen are you planning to work on that or already started? I've prepared a fix that removes the json.js altogether because it's some ancient history that is no longer needed and I wouldn't trust it as much as I trust the native JSON.parse and stringify. I could send a PR later this evening.

4O4 avatar Apr 06 '22 06:04 4O4

@patrikjuvonen are you planning to work on that or already started? I've prepared a fix that removes the json.js altogether because it's some ancient history that is no longer needed and I wouldn't trust it as much as I trust the native JSON.parse and stringify. I could send a PR later this evening.

@4O4 Go ahead please! Thanks.

patrikjuvonen avatar Apr 06 '22 07:04 patrikjuvonen