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

Unknown database type bit requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it. #138

Closed
webdesign7 opened this issue Nov 26, 2023 · 6 comments

Comments

@webdesign7
Copy link

Bug report

What I did:

Fresh installation: Backpack 6, Laravel 10 etc

What I expected to happen:

Open page manager http://localhost/admin/page/create

What happened:

Unknown database type bit requested, Doctrine\DBAL\Platforms\MySQL80Platform may not support it.

What I've already tried to fix it:

Backpack, Laravel, PHP, DB version:

Backpack 6, Laravel 10, PHP 8.2.7 , DB mysql 8

Copy link

welcome bot commented Nov 26, 2023

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 mediums:

  • Bug Reports, Feature Requests - Github Issues (here);
  • Quick help (How do I do X) - Gitter Chatroom;
  • Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the backpack-for-laravel tag;

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

@webdesign7
Copy link
Author

Screenshot 2023-11-26 at 10 36 05
To give more details

@pxpm
Copy link
Contributor

pxpm commented Nov 26, 2023

Hello @webdesign7 I am sorry but I was not able to reproduce your issue.

That usually occurs when you try to create a bit column type in mysql that's not natively supported, what people usually do is mapping the bit to boolean that's supported by mysql.

We don't use it in our packages as we mainly support MySQL, so your issue must be somewhere else.

From a quick google search I've found barryvdh/laravel-ide-helper#427

Maybe that helps.

If you think I am wrong, please re-open or feel free to continue the discussion.

Cheers

@pxpm pxpm closed this as completed Nov 26, 2023
@webdesign7
Copy link
Author

webdesign7 commented Nov 26, 2023

Thanks for your reply ! but I am confused

When I comment these fields in app/PageTemplate.php then it works :

$this->crud->addField([ 'name' => 'meta_title', 'label' => trans('backpack::pagemanager.meta_title'), 'fake' => true, 'store_in' => 'extras', ]); $this->crud->addField([ 'name' => 'meta_description', 'label' => trans('backpack::pagemanager.meta_description'), 'fake' => true, 'store_in' => 'extras', ]);

also I can't see any column type defined as bit where can I find that to change ?

anything to do with these fake field types. ?

As per new Laravel 10 dockerised installation it uses Mysql 8

@pxpm
Copy link
Contributor

pxpm commented Nov 26, 2023

You are welcome. I am confused too, why removing those fields would fix the issue.

Yes, they store json in a text column:

But AFAIK there is no issue in mysql 8 and those fields, I am using mysql 8 myself
image

Could it be some specific installation setting ? Do you have a chance to test it in other environment? Maybe a quick https://laragon.org/index.html local install just to try to debug the issue.

Let me know how it goes.

Cheers

@webdesign7
Copy link
Author

hey @pxpm thanks for your replies !

I have figured out that I had an old table in my DB and some columns were using bit type , I was completely unaware of those tbh.

So i have changed them to boolean and now it works !

Issue can be closed now.

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

No branches or pull requests

2 participants