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
Trying to get property 'default_locale' of non-object #4043
Comments
@yannnaingoo |
I tried like that but didn't work . SQLSTATE[42S22]: Column not found: 1054 Unknown column 'default_name' in 'field list' (SQL: insert into In PDOConnection.php line 63: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'default_name' in 'field list' In PDOConnection.php line 61: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'default_name' in 'field list' |
php artisan vendor:publish |
show following errors Copied Directory [/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views] To [/resources/views/errors] |
@yannnaingoo Let me know if still not resolved. |
@yannnaingoo Feel free to reopen any time for any query! |
didn't work for me on fresh install on Ubuntu 20.04. First had to install a lot of php dependencies that were not satisfied one by one. Then had problems with composer (forgot how I solved them). Then got "Trying to get property 'default_locale' of non-object". Did php artisan vendor:publish which outputted many errors where /path_to_file/file were capitablized instead of lowercase (Database instead of database and Migrations instead of migrations). Corrected them all one by one, did php artisan vendor:publish without errors, restarted php artisan serve and still have the same error. Output of terminal where ran the command: [Wed Nov 25 09:33:28 2020] PHP 7.4.12 Development Server (http://127.0.0.1:8000) started Resulting web page: (1/1) ErrorException Trying to get property 'default_locale' of non-objectin Locale.php line 44 Forgot to say that I did correct the file vendor/konekt/concord/src/Conventions/ConcordDefault.php according to instructions in #3807 . |
@airdogvan ' php artisan config:cache ' |
thank you for the help but sorry to say that I get the same errors... after running the commands you suggested. The commands ran without errors but the resulting webpage still says: Trying to get property 'default_locale' of non-object |
@airdogvan The installation docs make the installation process seem all magical: "Just run this script and everything should work!" Said script also seems to ignore errors and give false indications of success. You're likely running into issues on newer MySQL 8 versions and the way bagisto expects its user permissions to function. Make sure the bagisto user has the appropriate global permissions. (I had to issue ALTER, CREATE, CREATE ROUTINE, EXECUTE, SUPER, TRIGGER permissions globally for the bagisto user) Then run The team either needs to fix the script or dump it altogether as it caused quite a headache. |
If you are using existing laravel project then there will be some dummy data which needs to be intially into your database otherwise you will get this type of errors. You have to populate your empty database with dummy data. The process is simple -
note: |
run php artisan db:seed |
Applications/XAMPP/xamppfiles/bin/mysql_upgrade -u root -p. I m using this then its works in localhost |
Bug report
Title
Trying to get property 'default_locale' of non-object
Issue Description
**
(1/1) ErrorExceptionTrying to get property 'default_locale' of non-object
in Locale.php line 44
at HandleExceptions->handleError(8, 'Trying to get property 'default_locale' of non-object', '/home/yannaing/bagisto-standard/vendor/bagisto/bagisto/packages/Webkul/Shop/src/Http/Middleware/Locale.php', 44, array('request' => object(Request), 'next' => object(Closure), 'locale' => null))in Locale.php line 44
at Locale->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in VerifyCsrfToken.php line 76
at VerifyCsrfToken->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in AuthenticateSession.php line 39
at AuthenticateSession->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 105
at Pipeline->then(object(Closure))in Router.php line 683
at Router->runRouteWithinStack(object(Route), object(Request))in Router.php line 658
at Router->runRoute(object(Request), object(Route))in Router.php line 624
at Router->dispatchToRoute(object(Request))in Router.php line 613
at Router->dispatch(object(Request))in Kernel.php line 170
at Kernel->Illuminate\Foundation\Http{closure}(object(Request))in Pipeline.php line 130
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in InjectDebugbar.php line 65
at InjectDebugbar->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in StartSession.php line 56
at StartSession->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in EncryptCookies.php line 66
at EncryptCookies->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in CheckForMaintenanceMode.php line 63
at CheckForMaintenanceMode->handle(object(Request), object(Closure))in Pipeline.php line 171
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 105
at Pipeline->then(object(Closure))in Kernel.php line 145
at Kernel->sendRequestThroughRouter(object(Request))in Kernel.php line 110
at Kernel->handle(object(Request))in index.php line 74
at require_once('/home/yannaing/bagisto-standard/public/index.php')in server.php line 21
**
Preconditions
Please provide as detailed information about your environment as possible.
Steps to reproduce
It is important to provide a set of clear steps to reproduce this bug.If relevant please include code samples.
Expected result
Tell us what should happen.
Actual result
The text was updated successfully, but these errors were encountered: