krixx1337
krixx1337
FFilament
Created by krixx1337 on 9/23/2023 in #❓┊help
Custom action buttons not working in production
I'm pleased to share that I found a fix for the issue. It turns out that the problem was related to HTML minification by Cloudflare in my production environment. Disabling this feature resolved the issue.
8 replies
FFilament
Created by krixx1337 on 9/23/2023 in #❓┊help
Custom action buttons not working in production
Thank you for taking the time to look into my issue and for your helpful testing. I really appreciate your efforts. Regarding your question, yes, I am running filament:upgrade in my Composer post-update-cmd scripts. It's quite puzzling why this problem only occurs in the production environment despite everything appearing to be in order. I didn't have issues like that with Filament v2.
8 replies
FFilament
Created by krixx1337 on 9/23/2023 in #❓┊help
Custom action buttons not working in production
Yea, here is one of my pages with buttons
<?php

namespace App\Filament\Pages;

use Filament\Forms\Components\TextInput;
use Filament\Actions\Action;
use Filament\Pages\Page;

class ClearCache extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.clear-cache';

protected static ?string $navigationGroup = 'Pages';

protected function getHeaderActions(): array
{
return [
Action::make('clearCache')
->action(function (array $data): void {
$key = $data['cacheKey'];
cache()->forget($key);
})
->form([
TextInput::make('cacheKey')
->required(),
])
->requiresConfirmation(),
Action::make('clearAll')
->action(fn () => cache()->flush())
->color('danger')
->requiresConfirmation(),
];
}
}
<?php

namespace App\Filament\Pages;

use Filament\Forms\Components\TextInput;
use Filament\Actions\Action;
use Filament\Pages\Page;

class ClearCache extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.clear-cache';

protected static ?string $navigationGroup = 'Pages';

protected function getHeaderActions(): array
{
return [
Action::make('clearCache')
->action(function (array $data): void {
$key = $data['cacheKey'];
cache()->forget($key);
})
->form([
TextInput::make('cacheKey')
->required(),
])
->requiresConfirmation(),
Action::make('clearAll')
->action(fn () => cache()->flush())
->color('danger')
->requiresConfirmation(),
];
}
}
8 replies
FFilament
Created by krixx1337 on 9/23/2023 in #❓┊help
Restricting Admin Panel Access to Root Domain
4 replies