Laravel-Backpack / CRUD

Build custom admin panels. Fast!
https://backpackforlaravel.com
MIT License
3k stars 880 forks source link

[Bug] Method Illuminate\Database\PostgresConnection::getDoctrineColumn does not exist #5483

Closed kamil3658 closed 3 months ago

kamil3658 commented 3 months ago

Bug report

What I did

I wanted to sort by translation field.

What I expected to happen

It will sort the field correctly

What happened

I got error "Method Illuminate\Database\PostgresConnection::getDoctrineColumn does not exist."

What I've already tried to fix it

Nothing.

Is it a bug in the latest version of Backpack?

After I run composer update backpack/crud the bug... is it still there?

Yes.

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP VERSION:

PHP 8.3.4 (cli) (built: Mar 16 2024 08:40:08) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.4, Copyright (c) Zend Technologies with Zend OPcache v8.3.4, Copyright (c), by Zend Technologies with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans

LARAVEL VERSION:

11.0.8.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.3.0 backpack/crud: 6.7.3 backpack/generators: v4.0.4 backpack/theme-tabler: 1.2.8

welcome[bot] commented 3 months ago

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication channels:

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

-- Justin Case The Backpack Robot

pxpm commented 3 months ago

Hey @kamil3658 can you share a bit more about the error ?

What file/line does it throw ? A full stack trace would be helpful here.

Cheers

april-zeus commented 3 months ago

@pxpm Here is an example repo with this issue. I'm not sure if this is a mistake on our side or a bug. https://gitlab.com/adam_kwiecien/backpack-translations-sort

Try adding new company and sorting by name. You should get this exception image

Setting up the project should be simple. I'm using sail. You have there seeder with example user test@example.com/password.

I tried changing db to mysql, and this didn't help (I got other exception Method Illuminate\Database\MySqlConnection::getDoctrineColumn does not exist.). I also tried changing company name from json to text in db, that also didn't help.

pxpm commented 3 months ago

Thanks @kamil3658 and @april-zeus for the report and the amazing reproduction repo. 🙏

I've merged the fix in #5487 will tag a new version in a few moments.

Cheers