Okipa / laravel-table

Generate tables from Eloquent models.
MIT License
532 stars 64 forks source link

Undefined property: Okipa\LaravelTable\Table::$theadComponentPath #51

Closed devgiu closed 4 years ago

devgiu commented 4 years ago

Working with 1 version, and not sure what happened (related to a composer update) since a week or so, but now I get this error trying to open some page using the plugin. I thought was related to new releases of plugin, but I have "okipa/laravel-table": "^1.0", on my composer.json. And in last couple of weeks I did others "composer update" commands and worked AFAIR. Some idea what could cause the issue?

(where xxxx it's the root path of the project)

PHP Fatal error: Method Illuminate\View\View::__toString() must not throw an exception, caught Facade\Ignition\Exceptions\ViewException: Undefined property: Okipa\LaravelTable\Table::$theadComponentPath (View: xxxxxxxxxxx\resources\views\vendor\laravel-table\bootstrap\table.blade.php) in xxxxxxxx\vendor\okipa\laravel-table\src\Table.php on line 0

Okipa commented 4 years ago

Hi @devgiu, could you give me some additional precisions like the version of Laravel/PHP you are using ?

Okipa commented 4 years ago

I just found the problem : https://github.com/Okipa/laravel-table/compare/1.3.0...1.4.0#diff-94be9dc6b279191840f6097b91a6ecb6L11

This is a (unwanted breaking) change that was introduced by the change of the name of the property $theadComponentPath into $theadTemplatePath in order to improve the homogeneity of the package API. If you haven't touched the template, this would not break anything but I suspect that you did customized the template and this is breaking your customization. I should have done this in with a new major version number rather than in a minor upgrade, sorry for that.

If you make the update in your template, this should fix your problem. Please tell me if that solve your issue.

Okipa commented 4 years ago

@devgiu, could look into the solution above ?

I close this issue as this is fixed to me, feel free to give me feedback on this.

devgiu commented 4 years ago

Sorry, I just noticed notifications. Obviously, didn't tried your solution, anyway, I opted to update to 3.0 and upgrade too Laravel and PHP versions. Right now I'm getting another error AFAIR (I were out from the project some days), but I will post on another issue. Thanks.