Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaking usage of JSON "details" field #3637

Merged
merged 16 commits into from
Oct 18, 2018

Conversation

fletch3555
Copy link
Collaborator

  • Make sure details field is properly cast as array.
  • Cleared up usage of json_encode/json_decode

@fletch3555
Copy link
Collaborator Author

Ugh.... thanks for that. Phpunit passed locally, so I thought I had them all.

@fletch3555
Copy link
Collaborator Author

Okay, got it ALMOST passing.... Now I'm not sure how to debug this... @emptynick, would you mind trying to figure out what's going on here? https://travis-ci.org/the-control-group/voyager/jobs/443015823

Looks like it's a view trying to display a value ({{ }}), which calls out to html_special_chars(), which fails because it's an object, not a string. Almost certainly related to my details changes, but I'm not sure where we would display that value.

Also worth noting is that the helpers.php:547 in that stacktrace refers to the definition of dd(), which is super weird to me...

And finally, famous last words... it works perfectly fine on my local... (php 7.3)

@emptynick
Copy link
Collaborator

emptynick commented Oct 18, 2018

https://github.com/the-control-group/voyager/blob/410a54820a90c881e4a08f7ea49c5f113ee8fdda/resources/views/tools/bread/edit-add.blade.php#L301
You need to json_encode() this.

Are all conditions if (isset($row->details) still necessary?
I think if you'd check that once in your accessor, we could save a big load of those.

@fletch3555 fletch3555 force-pushed the bugfix/clear_up_json_field_usage branch 2 times, most recently from 9390ab2 to 9ddb319 Compare October 18, 2018 18:38
@fletch3555 fletch3555 force-pushed the bugfix/clear_up_json_field_usage branch from 9ddb319 to 9a04a26 Compare October 18, 2018 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants