vanilophp / framework

The truly Laravel E-commerce Framework
https://vanilo.io
MIT License
810 stars 102 forks source link

Incorrectly named DB table #72

Closed gotlisch closed 4 years ago

gotlisch commented 4 years ago

Installed the latest version of Vanilo the other day and when I tried to play around in the Admin I got the following error message. Seems the media table is named incorrectly. I changed it from "media" to "medias" directly in the DB and it seem to do the trick. I just wanted to bring this to your attention.

Facade\Ignition\Exceptions\ViewException SQLSTATE[42S02]: Base table or view not found: 1146 Table 'vanilo.medias' doesn't exist (SQL: select * frommediaswheremedias.model_id= 1 andmedias.model_idis not null andmedias.model_type= product) (View: /home/vagrant/code/vaniloapp/vendor/vanilo/framework/src/resources/views/product/index.blade.php)

Also, keen to know if you're still on track to release 2.0 by the 25th?

Keep up the great work!

Thanks, Mikael

fulopattila122 commented 4 years ago

Did you use the latest master or v1.2 when you had this exception?

gotlisch commented 4 years ago

I followed the installation guide so I used "composer require vanilo/framework". That said, I later on installed the Demo files and they did not have the same issue even though the table is called "media" in the demo version.

Thanks, Mikael

On Wed, 13 May 2020 at 17:14, Attila Fulop notifications@github.com wrote:

Did you use the latest master or v1.2 when you had this exception?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vanilophp/framework/issues/72#issuecomment-627795357, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTRLBBVWJCC5X76WHTSMS3RRJCGBANCNFSM4M7KNHGQ .

fulopattila122 commented 4 years ago

What does composer show vanilo/framework say?

My guess is that you're on the unstable master/2.0-dev branch

gotlisch commented 4 years ago

Looks like I'm on 1.2

name : vanilo/framework descrip. : E-commerce Framework for Laravel keywords : versions : * 1.2.0 type : library license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText homepage : source : [git] https://github.com/vanilophp/framework.git 0115b92c60cf13a3169e1179da38f31d43258a21 dist : [zip] https://api.github.com/repos/vanilophp/framework/zipball/0115b92c60cf13a3169e1179da38f31d43258a21 0115b92c60cf13a3169e1179da38f31d43258a21 path : /home/vagrant/code/vaniloapp/vendor/vanilo/framework names : vanilo/framework

autoload psr-4 Vanilo\Framework\ => src files

requires konekt/appshell ~1.5 laravel/framework ~5.5|~6.0|~7.0 php ^7.2 spatie/laravel-medialibrary ^7.3 vanilo/cart ~1.2 vanilo/category ~1.2 vanilo/channel ~1.2 vanilo/checkout ~1.2 vanilo/contracts ~1.2 vanilo/order ~1.2 vanilo/product ~1.2 vanilo/properties ~1.2 vanilo/support ~1.2

On Wed, 13 May 2020 at 19:23, Attila Fulop notifications@github.com wrote:

What does composer show vanilo/framework say?

My guess is that you're on the unstable master/2.0-dev branch

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vanilophp/framework/issues/72#issuecomment-627863369, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTRLBAHUWGX7EINA6E7QWTRRJRHXANCNFSM4M7KNHGQ .

fulopattila122 commented 4 years ago

This problem actually comes from Spatie's Media Library package with Laravel 7, see: spatie/laravel-medialibrary#1870 but the root cause under the hood is from doctrine inflector: https://github.com/doctrine/inflector/pull/142

So as far as I understand composer update doctrine/inflector should upgrade it either to 1.4.1 or to 2.0.1 and that should fix the problem. The buggy doctrine inflector versions are 1.4.0 and 2.0.0

Please let me know if you succeeded.

gotlisch commented 4 years ago

Will give that a go, thank you!

On Thu, 14 May 2020 at 16:30, Attila Fulop notifications@github.com wrote:

This problem actually comes from Spatie's Media Library package with Laravel 7, see: spatie/laravel-medialibrary#1870 https://github.com/spatie/laravel-medialibrary/issues/1870 but the root cause under the hood is from doctrine inflector: doctrine/inflector#142 https://github.com/doctrine/inflector/pull/142

So as far as I understand composer update doctrine/inflector should upgrade it either to 1.4.1 or to 2.0.1 and that should fix the problem. The buggy doctrine inflector versions are 1.4.0 and 2.0.0

Please let me know if you succeeded.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vanilophp/framework/issues/72#issuecomment-628418124, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTRLBEY2HQDUVTVXY33L5DRROFWRANCNFSM4M7KNHGQ .

fulopattila122 commented 4 years ago

Did it work?

gotlisch commented 4 years ago

I didn't try in the end, ended up working from the version you had in your demo site which didn't have the same problem.

On Sun, 24 May 2020 at 19:49, Attila Fulop notifications@github.com wrote:

Did it work?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vanilophp/framework/issues/72#issuecomment-633205966, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTRLBDKNIPEXRPSBULYUWTRTDUSHANCNFSM4M7KNHGQ .