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.

[Bug] relationship with subfields (and probably repeatable) incorrect reflection of the translatable fields

See original GitHub issue

Bug report

What I did

i make relationship

CRUD::addField([   // relationship
            'label'=>'Answers',
            'type' => "relationship",
            'name' => 'responses',
            'subfields'   => [
                [
                    'label'=>'Question',
                    'name' => 'text',
                    'type' => 'textarea',
                    'wrapper' => [
                        'class' => 'form-group col-md-4',
                    ],
                ],
                [
                    'label'=>'Image',
                    'name' => 'img',
                    'type'=>'text',
                    'wrapper' => [
                        'class' => 'form-group col-md-4',
                    ],

                ],
                [   
                    'name' => 'buttons',
                    'label' => 'Buttons',
                    'type'=>'text',
                    'wrapper' => [
                        'class' => 'form-group col-md-4',
                    ],
                ],
            ],
            'tab'=>'Answers'
        ]);

this fields is translatable public $translatable = ['text','img','buttons'];

What I expected to happen

reflection of blank lines when there is no data in my locale or locale has ‘NULL’ data

What happened

translbug

What I’ve already tried to fix it

vendor/backpack/pro/resources/views/fields/relationship.blade.php

I found that if there is no value for my locale, the entire value from the table field in json format gets here.

and I have no idea how to fix it except dirty check in view

Is it a bug in the latest version of Backpack?

yes

Backpack, Laravel, PHP, DB version

last versions

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
guleswinecommented, May 25, 2022

oh, i found new bug in relation model if you have mutator on relation field

public function setTextAttribute($value){
        return $value;
    }

but leave this field blank and save the entity…

tans3

this happens only if you work with this entity through Related models

1reaction
pxpmcommented, May 4, 2022

Hello @guleswine

Thanks again for one more issue report. I think I got this fixed in https://github.com/Laravel-Backpack/CRUD/pull/4267

If you have time do you want to give it a try and let us know ? It could help alot in the review process and finding something that slipped me.

Cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Alma 2022 Release Notes - Ex Libris Knowledge Center
This prevents the field from incorrectly getting associated with the heading and improves ... Repeatable Fields Available for Staff Deposit Forms.
Read more >
PSYC-1113-Psychology.pdf - OSU-OKC
Reflecting the diversity of the field of psychology itself, members, affiliate members, and associate members span the spectrum from students to ...
Read more >
Accelerating ethics, empathy, and equity in geographic ...
As pertaining to science, ethics typically involves reflection upon moral questions that arise in research, publication, data collection and ...
Read more >
Representational similarity analysis - connecting the branches ...
A fundamental challenge for systems neuroscience is to quantitatively relate its three major branches of research: brain-activity ...
Read more >
Questionable Research Practices, Low Statistical Power, and ...
Replication projects in other fields show similar results. ... This is again incorrect, and bibliometric analyses show that this error is ...
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