Laravel-Backpack / CRUD

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

[Bug] Mongo Db Connection #5553

Closed eudovic closed 4 weeks ago

eudovic commented 1 month ago

Bug report

What I did

I am using MongoDB connection as part of the CQRS architecture in a Backpack project. Everything seems to be working fine except for the DevTools Create Model view, which is now broken. image

??

What I expected to happen

I expected to be able to create new MySQL models. ??

What happened

The view is now broken. ??

What I've already tried to fix it

I haven't attempted any fixes yet. ??

Is it a bug in the latest version of Backpack?

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

Backpack, Laravel, PHP, DB version

Back pack 6 , laravel 10 , PHP 8.1, DB mysql and mongo

When I run php artisan backpack:version the output is: backpack/activity-log: 2.0.4 backpack/basset: 1.3.4 backpack/crud: 6.7.17 backpack/devtools: 3.1.5 backpack/editable-columns: 3.0.9 backpack/generators: v4.0.5 backpack/logmanager: v5.0.2 backpack/pagemanager: 3.3.0 backpack/permissionmanager: 7.2.1 backpack/pro: 2.2.4 backpack/theme-tabler: 1.2.10

welcome[bot] commented 1 month 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 1 month ago

Hello @eudovic thanks for the report.

Can you confirm if that happens every time, or when you add some specific column type or perform some specific action ?

Can you tell me the minimum steps to reproduce this issue ?

Thanks in advance.

Cheers

eudovic commented 1 month ago

The error occurs when trying to open the page for creating new models, that is, it is not even possible to start configuring a new one. About the steps to reproduce. Here I just used the laravel/mongodb library and created new models using mongo dB, this way I had two different databases in the project. MySQL and mongodb. This way made the page break.

Em seg., 8 de jul. de 2024 06:05, Pedro Martins @.***> escreveu:

Hello @eudovic https://github.com/eudovic thanks for the report.

Can you confirm if that happens every time, or when you add some specific column type or perform some specific action ?

Can you tell me the minimum steps to reproduce this issue ?

Thanks in advance.

Cheers

— Reply to this email directly, view it on GitHub https://github.com/Laravel-Backpack/CRUD/issues/5553#issuecomment-2213449484, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNZHGSROMRYIFM6VHPWAILZLJI4PAVCNFSM6AAAAABKOMHUS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJTGQ2DSNBYGQ . You are receiving this because you were mentioned.Message ID: @.***>

pxpm commented 1 month ago

Is the default connection in config/database.php the mongodb or the mysql one ? Changing it has any effect on devtools ?

Cheers

eudovic commented 1 month ago

Tried Now changing the default connection, but same trouble [image: image.png]

Em seg., 8 de jul. de 2024 às 07:11, Pedro Martins @.***> escreveu:

Is the default connection in config/database.php the mongodb or the mysql one ? Changing it has any effect on devtools ?

Cheers

— Reply to this email directly, view it on GitHub https://github.com/Laravel-Backpack/CRUD/issues/5553#issuecomment-2213602133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNZHGQFBCCVAOFLJ6TICA3ZLJQVFAVCNFSM6AAAAABKOMHUS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJTGYYDEMJTGM . You are receiving this because you were mentioned.Message ID: @.***>

eudovic commented 1 month ago

Hi, how are you doing? Do you have any news about that? Is there anything you want me to do help you debug? Tks!

Em ter., 9 de jul. de 2024 às 21:47, Emerson Udovic @.***> escreveu:

Tried Now changing the default connection, but same trouble [image: image.png]

Em seg., 8 de jul. de 2024 às 07:11, Pedro Martins < @.***> escreveu:

Is the default connection in config/database.php the mongodb or the mysql one ? Changing it has any effect on devtools ?

Cheers

— Reply to this email directly, view it on GitHub https://github.com/Laravel-Backpack/CRUD/issues/5553#issuecomment-2213602133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNZHGQFBCCVAOFLJ6TICA3ZLJQVFAVCNFSM6AAAAABKOMHUS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJTGYYDEMJTGM . You are receiving this because you were mentioned.Message ID: @.***>

pxpm commented 4 weeks ago

Hey @eudovic sorry I missed your previous message.

If the same error persist after you changed the default db, it's because either the configs didn't take effect (maybe cache?), or that the mongo db implementation completely takes over, because in the error your can see it's trying to call some Mongo class.

If you can reproduce this using a rdbms with sql I can try to help you a little more. Or if the error is related with sql classes. If it's related with mongo classes I am totally un-ware of how to fix it, just like I said previously, probably using a project with just mysql, or even sqlite, create there the stuff and move over the files.

Sorry I can't be much more help here. Let me know how it goes 🙏

eudovic commented 4 weeks ago

Don't worry! I Will try to fix and I Will let you know If I have success doing that. Thank you so much

Em qua., 24 de jul. de 2024 05:38, Pedro Martins @.***> escreveu:

Hey @eudovic https://github.com/eudovic sorry I missed your previous message.

If the same error persist after you changed the default db, it's because either the configs didn't take effect (maybe cache?), or that the mongo db implementation completely takes over, because in the error your can see it's trying to call some Mongo class.

If you can reproduce this using a rdbms with sql I can try to help you a little more. Or if the error is related with sql classes. If it's related with mongo classes I am totally un-ware of how to fix it, just like I said previously, probably using a project with just mysql, or even sqlite, create there the stuff and move over the files.

Sorry I can't be much more help here. Let me know how it goes 🙏

— Reply to this email directly, view it on GitHub https://github.com/Laravel-Backpack/CRUD/issues/5553#issuecomment-2247235637, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHNZHGVXA26B2NGIFEE5DX3ZN5RZXAVCNFSM6AAAAABKOMHUS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBXGIZTKNRTG4 . You are receiving this because you were mentioned.Message ID: @.***>

pxpm commented 4 weeks ago

Sure, thanks @eudovic

Let me know your findings, maybe we can work something out to provide that support in-house 👍

Closing this, but I am subscribed to notifications 👍

Cheers