question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[4.1][Bug] Table field is not properly (?) formatting JSON

See original GitHub issue

Bug report

What I did

Using the table field, then adding data to a field that contained a quote.

What I expected to happen

The data to be saved or remembered.

What happened

The JSON isn’t valid.

What I’ve already tried to fix it

Problem seems to lie in table.blade.php on line 208 where you’re formatting the inputs for JSON, but I’m not sure exactly the solution, or why this is invalid…

This problem exists on your demo site so let me show you there.

Edit any Monster and go to Miscellaneous and add a row to the table.

Do one without any quotes and save - it works:

image

Then add a new row with a quote:

image

Now when you save and go back - the data is gone. It’s invalid JSON so is presumably filtered somewhere on your model. For me I have a validator for this JSON and it complains.

The other way this can manifest is with form value persistence. E.g. add a row without a quote and refresh the page - it will still be there. And likewise add a row with a quote and it will not be there on refresh.

Instead you get this error in the console:

image

I honestly don’t know why this seems to happen - the resouces online I’ve looked at seem to suggest you’re escaping the quotes correctly!

Cheers all

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tabacitucommented, Jun 29, 2020

I’ve just merged #2960 that fixes this. It’ll be available with a composer update later today when we tag version 4.1.12. Thanks a lot @bnxdev for raising the issue and @pxpm & @ibpavlov for fixing it! I’m sorry it took so long to fix and merge.

1reaction
tabacitucommented, Jun 16, 2020

Great! Then can you please create a PR for this @pxpm ? I see @bnxdev hasn’t replied in 21 days so he’s probably busy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug listing with status RESOLVED with resolution OBSOLETE ...
(was: =dev-java/jdbm-1.0 is available)" status:RESOLVED resolution:OBSOLETE severity:enhancement · Bug:107027 - "dev-vcs/cvsd init script for is not ...
Read more >
problem-solved | Jeff Kemp on Oracle | Page 2
I have a standard tabular report with checkboxes on each row, and a multi-record delete button called MULTI_ROW_DELETE. If the user clicks the...
Read more >
BIG-IP 13.1.4.1 Fixes and Known Issues - AskF5
889601-5, 3-Major, OCSP revocation not properly checked ... "JSON data does not comply with format settings" and "Illegal meta character in ...
Read more >
MySQL Connector/J 5.1 Release Notes
Changes in MySQL Connector/J 5.1.16 (Not released) . ... getString() sometimes returned garbled data for columns of the JSON data type.
Read more >
Evergreen 3.0 Release Notes
Fixes a bug that caused grids on Bills and Patron Messages screens to not display properly. The following fields are now available for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found