Closed jmalko closed 3 months ago
The first column in your preferences is store_number_complete
. What does the YAML for that field look like?
Doesn't exist anymore either in the data or blueprint.
Ah, that'll have been it then. If you were to remove / replace it with a field that does exist in your blueprint, then it'll work.
I'll keep this open since non-existent fields can probably be filtered out to prevent it from erroring.
Oddly enough, I can't seem to reproduce this anymore. I'll close this without a fix.
Description
I upgraded a site locally with a new $primaryKey in a model (and all the other changes to facilitate).![image](https://github.com/statamic-rad-pack/runway/assets/6345401/ab875a8d-9f62-452b-a89d-9b0542dc1cfd)
I added the 'title_field' to the config as documented.![image](https://github.com/statamic-rad-pack/runway/assets/6345401/1c8751a6-24bf-4e2a-8be2-db4ebd867a8d)
And everything just worked in local. On production however, I would get this error when visiting the main /cp route for the model:
StatamicRadPack\Runway\Http\Controllers\CP\ResourceController::getPrimaryColumn(): Return value must be of type string, null returned
After troubleshooting on Discord, removing or invalidating runway preferences on my user fixed the issue:![image](https://github.com/statamic-rad-pack/runway/assets/6345401/032f7f53-1696-4e31-816c-d8786b6cca0d)
Users are in the database here, which is why local changes to my preferences did not carry over - and why a fresh install of the site would also make it work.
Steps to reproduce
Create a model and add it to runway with some columns. Save visibility/order of columns to display. Change the model to use a different $primaryKey and adjust
title_field
onconfig/runway.php
Visit the runway model page.Environment