laravel-enso/tables

All tables with joins report string error and fail to load

curtisdelicata opened this issue · 7 comments

This is a bug | feature request.

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

All tables with joins report string error and fail to load

Steps to Reproduce

User groups and menus works but most of others fail as they use joins.

Expected behavior

Actual behavior

I think my composer was stuck on 4.0.2. Looking at 4.0.3 it looks like may fix. I'll try that now.

exception: "TypeError"
file: "/home/genealogia/public_html/vendor/laravel-enso/tables/src/Services/Data/Sorts/DefaultSort.php"
line: 31
message: "Return value of LaravelEnso\Tables\Services\Data\Sorts\DefaultSort::column() must be of the type string, null returned"

defaultSort doesn't exist in my tables config

Changing the get defaultSort to dtRowId fixed it for me. That was in the vendor directory though on line 31.

Hi @curtisdelicata
For defaultSort you need to define it in your Table/Template otherwise it will use dtRowId that was defined in your config/table.php

It was broken on default Enso pages too though for me. It never defaulted to using dtRowId

I guess it should have been solved, if you still have a problem please reopen this issue.