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

JSON Fields aren't working anymore #140

Closed
bernhardh opened this issue Feb 3, 2021 · 4 comments
Closed

JSON Fields aren't working anymore #140

bernhardh opened this issue Feb 3, 2021 · 4 comments
Assignees

Comments

@bernhardh
Copy link
Contributor

Since your last updates, JSON Fields (for example https://github.com/armincms/json field, but probably similar as well) are broken. I am getting Undefined property: Armincms\Json\Json::$panel in vendor/eminiarts/nova-tabs/src/Tabs.php:50:

if ($field instanceof MergeValue) {
    if (null === $field->panel) {
        $field->panel = $this->name;
    }


    $this->addFields(
        new Tab($tab->getTitle(), $field->data)
    );

    continue;
}

MergeValues doesn't have to have defined panel's, right?

@RVxLab
Copy link
Collaborator

RVxLab commented Feb 3, 2021

Damn, didn't think of that one. This was a fix intended for #112.

A simple property_exists check should fix that. I'll fix it tonight and provide a 1.4.1 for it.

@RVxLab RVxLab self-assigned this Feb 3, 2021
@bernhardh
Copy link
Contributor Author

Correct. I have fixed it with if ($field instanceof MergeValue && isset($field->panel)) {. Should I do a PR for it or is it easier if you fix it yourself?

@RVxLab
Copy link
Collaborator

RVxLab commented Feb 3, 2021

That line would undo the fix mentioned. I'll take care of it.

Thanks for the bug report and sorry about this.

@RVxLab RVxLab closed this as completed in c06f636 Feb 3, 2021
@RVxLab
Copy link
Collaborator

RVxLab commented Feb 3, 2021

I just released v1.4.1 to address this issue. Thanks again for your report.

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

No branches or pull requests

2 participants