Laravel Version: 9.48.0
PHP Version: 8.1.12
Composer Version: 2.1.6
Database: MySql 8.0.31
Statamic Version: 3.3.65 PRO
The issue
After following the "Storing Entries in a Database" docs (apart from the fact I use an auto-increment ID), I encountered an issue where creating a new entry (a Page in my case) would store everything accordingly in the entries table, but when editing the newly created entry, nothing that is stored in the data column was filled (i.e. Title).
After debugging, I found out that when selectableColumns is called, the data column is not included in the fetched columns. If I hardcode return ['*']; without anything else in that method, it fills the form properly. Of course, it is not a proper fix, but it might be a good place to start debugging further.
Reproduction repo
P.S. My "hotfix" is applied in this repo, so if you want to see the actual bug, search for selectableColumns method in app/Eloquent/Entries/EntryQueryBuilder.php and comment it.
Environment
Laravel Version: 9.48.0 PHP Version: 8.1.12 Composer Version: 2.1.6 Database: MySql 8.0.31 Statamic Version: 3.3.65 PRO
The issue
After following the "Storing Entries in a Database" docs (apart from the fact I use an auto-increment ID), I encountered an issue where creating a new entry (a Page in my case) would store everything accordingly in the
entries
table, but when editing the newly created entry, nothing that is stored in thedata
column was filled (i.e. Title).After debugging, I found out that when
selectableColumns
is called, thedata
column is not included in the fetched columns. If I hardcodereturn ['*'];
without anything else in that method, it fills the form properly. Of course, it is not a proper fix, but it might be a good place to start debugging further.Reproduction repo
P.S. My "hotfix" is applied in this repo, so if you want to see the actual bug, search for
selectableColumns
method inapp/Eloquent/Entries/EntryQueryBuilder.php
and comment it.https://github.com/piljac1/statamic-eloquent-issues