Open Lindomar-Paulo opened 2 months ago
It looks like you have published the views in your project.
The recommendation is NOT to do so.
There have been several significant changes in recent versions, which I think are causing this issue.
When sharing code, please wrap it in three ` marks either side, so that it formats, otherwise there's zero chance of reading it!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What happened?
when upgrading to version 3.4.15. Columns with secondaryHeader are experiencing a fatal error: Rappasoft\LaravelLivewireTables\Views\Column::getSecondaryHeaderContents(): Return value must be of type Illuminate\Contracts\Foundation\Application|Illuminate\View\Factory|Illuminate\View\View|Illuminate\Support\HtmlString|string, null returned. The same application running in version v3.4.9 works normally.
How to reproduce the bug
<?php
namespace App\Livewire;
ini_set('default_charset', 'UTF-8');
use Rappasoft\LaravelLivewireTables\DataTableComponent; use Rappasoft\LaravelLivewireTables\Views\Column; use App\Models\Relint\Relint; use App\Models\Relint\RelintStatus; use App\Models\Unidade; use Illuminate\Database\Eloquent\Builder; use Rappasoft\LaravelLivewireTables\Views\Columns\DateColumn; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\DB; use Rappasoft\LaravelLivewireTables\Views\Filters\DateFilter; use Rappasoft\LaravelLivewireTables\Views\Filters\MultiSelectFilter; use Rappasoft\LaravelLivewireTables\Views\Filters\TextFilter;
class TableRilint extends DataTableComponent { public $myParam = 'Default';
}
Package Version
3.4.15
PHP Version
8.1.x
Laravel Version
No response
Alpine Version
No response
Theme
Bootstrap 5.x
Notes
I don't know if it can affect it. The application where no error occurs is running with APACHE web server, and the one that is giving error is in DOCKER with NGNIX
Error Message
Rappasoft\LaravelLivewireTables\Views\Column::getSecondaryHeaderContents(): Return value must be of type Illuminate\Contracts\Foundation\Application|Illuminate\View\Factory|Illuminate\View\View|Illuminate\Support\HtmlString|string, null returned.