Voyager: Cannot Add BREAD - Undefined variable: dataRow

Created on 19 Oct 2018  路  16Comments  路  Source: the-control-group/voyager

Version information

  • Laravel: v5.7.9
  • Voyager: v1.1
  • PHP: 7.1
  • Database: 10.1.36-MariaDB

Description


After I create a table using the database manager tool, and then go into BREAD tool and click add BREAD to this table, i get the Whoops error "Undefined variable: dataRow". Upon further inspection, I noticed that there is no record in the data_types table created for the new table I created.

I have tried adding a new table with a model, and without a model.

Expected behavior

The BREAD add/edit screen should appear.

All 16 comments

Same problem

image

I have the same problem:

problem_capture

Is it Voyager 1.1.8?

The problem are in line 301:
Other version:

Don't have if:

Sorry about that everyone. It's related to my changes which we merged and released yesterday. The changes from #3647 will fix it, but just need to be resubmitted on the correct branch.

We'll get this fixed and released very soon

My temporary solution is removed command.

<?php echo e(json_encode($dataRow->details)); ?>

and then refresh. After refresh just put again

Is it Voyager 1.1.8?

Yes

I have the same problem!
if I switch to older version it will work ?

Yes, this issue was introduced in 1.1.8, so 1.1.7 or lower would be fine. We'll get out 1.1.9 with a fix for this soon

I have updated to 1.1.9 still having this issue!!!

Edit:
I have deleted the users data type from data_rows table, now it's working.
Edit: my relationships not working after updating to 1.1.8 and then to 1.1.9

Also after creating BREAD it's looking for table using "Display Name (Plural)"
url: admin/test
table: test
error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db.tests' doesn't exist (SQL: select * from tests order by created_at desc)

@AnasTHH that doesn't sound related. But the answer is that laravel convention is to have tables be named plural (i.e. tests). Any variation from that requires modification to the model class (i.e. $table = 'test';)

3665

After updating to 1.1.10 Still having relationships issue, When adding or editing a post the relationship dropdown is not working.

Thats unrelated to this issue and should be solved in #3660 or #3661

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

Was this page helpful?
0 / 5 - 0 ratings