Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] CRUD::setFromDb() : Unknown database type ltree requested, Doctrine\DBAL\Platforms\PostgreSQL100Platform may not support it. #5438

Open
Astriel opened this issue Feb 3, 2024 · 1 comment
Labels

Comments

@Astriel
Copy link

Astriel commented Feb 3, 2024

Bug report

What I did

I've integrated Laravel Bakcpack + Pro + Devtools on my current Laravel project. I'm using Pgsql 14.10 and a ltree type of field. I've generated my CRUDS with the DevTools, but I can't access any of them because the ltree field is not recognized by Backpack.

What I expected to happen

Being able to see a ListOperationCrud avec the generation of the CRUD through Devtools.

What happened

` /**

 * Define what happens when the List operation is loaded.

 *

 * @see  https://backpackforlaravel.com/docs/crud-operation-list-entries

 * @return void

 */

protected function setupListOperation()

{

    CRUD::setFromDb(); // set columns from db columns.



    /**

     * Columns can be defined using the fluent syntax:

     * - CRUD::column('price')->type('number');

     */

}`

Unknown database type ltree requested, Doctrine\DBAL\Platforms\PostgreSQL100Platform may not support it.

What I've already tried to fix it

To include this package : https://github.com/tpetry/laravel-postgresql-enhanced but still not working because I think it comes from the setFromDb(); method which is not supposed to crash like this.

Is it a bug in the latest version of Backpack?

Yes.

Backpack, Laravel, PHP, DB version

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

PHP 8.1.10 (cli) (built: Aug 30 2022 18:05:49) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.10, Copyright (c) Zend Technologies

LARAVEL VERSION:

10.43.0.0

BACKPACK PACKAGE VERSIONS:

backpack/basset: 1.2.2
backpack/crud: 6.6.1
backpack/devtools: 3.0.4
backpack/generators: v4.0.3
backpack/language-switcher: 2.0.0
backpack/logmanager: v5.0.1
backpack/pro: 2.1.2
backpack/theme-coreuiv4: 1.1.1

@Astriel Astriel added the triage label Feb 3, 2024
@jcastroa87
Copy link
Member

Hi @Astriel

Since ltree is not a native field type in SQL this is not a bug, it is simply not supported by having to use it through an extension. In any case, I will keep the topic open for a period to see if anyone else requires this new feature to be developed or if you find an alternative before you can share it with the community.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants