Open aaronbushnell opened 2 days ago
Can you add the full stack trace?
Definitely! Here you go—
App\Models\Post::url must return a relationship instance, but "null" was returned. Was the "return" keyword used?
at vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:611
607▕ $relation = $this->$method();
608▕
609▕ if (! $relation instanceof Relation) {
610▕ if (is_null($relation)) {
➜ 611▕ throw new LogicException(sprintf(
612▕ '%s::%s must return a relationship instance, but "null" was returned. Was the "return" keyword used?', static::class, $method
613▕ ));
614▕ }
615▕
+29 vendor frames
30 please:18
Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))
Description
I'm getting
App\Models\Post::url must return a relationship instance
when trying to index Runway models that useurl
within the fields configuration:However,
url
does work when including it in a Runway loop:Steps to reproduce
php please search:update posts
Environment
Environment Application Name: OBFUSCATED Laravel Version: 11.29.0 PHP Version: 8.3.12 Composer Version: 2.7.7 Environment: local Debug Mode: ENABLED URL: post-statamic.test Maintenance Mode: OFF Timezone: America/Indiana/Indianapolis Locale: en
Cache Config: NOT CACHED Events: CACHED Routes: CACHED Views: CACHED
Drivers Broadcasting: log Cache: file Database: sqlite Logs: stack / single Mail: log Queue: sync Session: file
Statamic Addons: 11 Sites: 1 Stache Watcher: Enabled (auto) Static Caching: Disabled Version: 5.33.1 PRO
Statamic Addons rias/statamic-redirect: 3.8.1 statamic-rad-pack/runway: 7.11.0 statamic/seo-pro: 6.3.0 stillat/relationships: 2.2.1 trendyminds/guide: dev-main trendyminds/link: dev-main trendyminds/nerf: 1.2.0 trendyminds/orbit-statamic: 2.0.0 trendyminds/statamic-geocoder: 2.0.2 trendyminds/statamic-palette: 1.2.1 trendyminds/tip: 1.0.0