F
Filament2mo ago
nexxai

Unable to locate a class or view for component [filament-panels::resources.relation-manager]

I have the following in a ViewRecord view to show a relation manager:
@if (count($relationManagers = $this->getRelationManagers()))
<x-filament-panels::resources.relation-manager :active-manager="$this->activeRelationManager" :managers="$relationManagers" :owner-record="$record"
:page-class="static::class" />
@endif
@if (count($relationManagers = $this->getRelationManagers()))
<x-filament-panels::resources.relation-manager :active-manager="$this->activeRelationManager" :managers="$relationManagers" :owner-record="$record"
:page-class="static::class" />
@endif
Prior to v4, this worked fine. After the upgrade, it's failing. I've tried: 1. Clearing my view cache 2. Publishing the vendored filament-panels files I can see that the resources/views/vendor/filament-panels/resources/relation-manager.php file exists but for whatever reason, it doesn't seem to want to be used. Happy to provide any more information if it will help.
Solution:
Realized what I was using the custom view can be replaced with prime components now so I didn't need to solve this particular issue. Apologies for anyone who finds this in the future as I was never able to solve the original problem.
Jump to solution
3 Replies
nexxai
nexxaiOP2mo ago
This is the contents of the "ViewTour" ViewRecord file:
<?php

namespace App\Filament\Resources\Tours\Pages;

use App\Filament\Resources\Tours\TourResource;
use Filament\Resources\Pages\ViewRecord;

class ViewTour extends ViewRecord
{
protected static string $resource = TourResource::class;

protected string $view = 'filament.resources.tours.pages.view-tour';
}
<?php

namespace App\Filament\Resources\Tours\Pages;

use App\Filament\Resources\Tours\TourResource;
use Filament\Resources\Pages\ViewRecord;

class ViewTour extends ViewRecord
{
protected static string $resource = TourResource::class;

protected string $view = 'filament.resources.tours.pages.view-tour';
}
Solution
nexxai
nexxai2mo ago
Realized what I was using the custom view can be replaced with prime components now so I didn't need to solve this particular issue. Apologies for anyone who finds this in the future as I was never able to solve the original problem.
mbh00
mbh005d ago
I also encounter the exact same problem, i fixed it by removing the custom view as you did.

Did you find this page helpful?