thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

Deletion of table fields doesnt delete entry in data_rows #1311

Open pboethig opened 7 years ago

pboethig commented 7 years ago

Description:

If I add a selectbox in bread controller to a string field and delete the field in database then the next call to the bread controller leads to following exception: Undefined property: stdClass::$ (View: /var/www/vendor/tcg/voyager/resources/views/bread/browse.blade.php /var/www/storage/framework/views/6522386055addfddd928c0960bbf32a1544e710d.php line 65

That means, if a add a new property on a table with data on it, the breadcontroller breaks, because its not bc save on the rows, that does not contain the new column

Steps To Reproduce:

fletch3555 commented 7 years ago

You shouldn't be circumventing Voyager's functionality by deleting tables/fields outside of Voyager (i.e. through phpmyadmin), especially if they were created with Voyager. We're looking into how to handle this more gracefully.

pboethig commented 7 years ago

I have deleted the fields in voyager. After that all fielddefinition are still available in the table. Even the table is still available.

sajjad1112ali commented 5 years ago

Currently i am facing the same issue. I am using Laravel 5.7 and voyager 1.1 I want to ask if there is any update on this Bug?

emptynick commented 5 years ago

Go to the BREAD-builder for that table and hit save. That should work.