After upgrade to 202180.0, error about the loaderScriptDir
Hi guys,
I have, after upgrade to 202180.0, always the error about the loaderScriptDir from propel
Zed.CRITICAL: Propel\Runtime\Exception\PropelException - Database map was not initialized. Please check the database loader script included by your conf.
After propel:install is problem gone. After docker/sdk up
i have again the problem.... How can solve the problem?
Standard configuration used!
Comments
-
Hey @UL65CH0MC that what helped me on one of the projects recently, do you have that?
0 -
It seems that the database map (autogenerated) located per default in spryker under /data/cache/propel is only in container and not synced locally... it means that on up it will be synced to empty..
0 -
@UKJSE6T47 according project release changes we don't need it, because it was decladed in config as standard value
0 -
but not src/Orm/Propel .... -> data/cache/propel..
I have also added in .dockerignore
!/data/cache/propel
0 -
I think it make sense to have this file under cache because is autogenerated and it was about me the quickly solution... but a little bit dangerous because without this file it does not work nothing... because no connection db map..
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,048 ⚖️ - Guardians (admin)
Heyhey,
the answer from @UKJSE6T47 is correct but should not be needed anymore (we patched it). There will be a default value set (to the cache folder as you pointed out). But with this config value you can override the path if you want. The file gets generated withconsole propel:model:build
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,048 ⚖️ - Guardians (admin)
Are you saying that it will be lost after you do another docker/sdk up because it is in the cache folder?
0 -
@florian.scholz yes correct... it is generated but only in container and not synced back locally via mutagen.. even if it is explicity not ignored in dockerignore..
I have already more times bootstraped and up the docker sdk
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,048 ⚖️ - Guardians (admin)
this is strange - i am also using mutagen but i can see the file on my host-machine in phpstorm 😕
0 -
ok strange... can u share your dockerignore ?
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,048 ⚖️ - Guardians (admin)
.git* .idea .DS_Store node_modules /vendor /data !/data/import !/data/export .git* .unison* .docker-sync /.nvmrc /.scrutinizer.yml /newrelic.ini /docker !/docker/deployment/ /src/Orm/Zed/*/Persistence/Base /src/Orm/Zed/*/Persistence/Map /src/Orm/Propel/* !/src/Orm/Propel/.gitkeep /src/Generated /public/Yves/assets /public/Zed/assets /tests/*/*/*/_output/* /tests/*/*/*/_support/_generated/*
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,048 ⚖️ - Guardians (admin)
it is the default
0 -
it is just the same.. i just added !/data/cache/propel to solve the problem but without effort... ok.. i will debug in deep to understand the root cause of the missing sync...
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,048 ⚖️ - Guardians (admin)
Please keep me updated, maybe I missed something while patching it
0 -
Of course...
Did u tried already to delete the file on host system and then run the propel command to see if the file is again synced back to host?0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,048 ⚖️ - Guardians (admin)
i did now and it synched it back
0 -
if i configured in config_propel as u said in the first reply
'loaderScriptDir' => APPLICATION_ROOT_DIR . '/src/Orm/Propel/generated-conf/',
then it works as expected...
0 -
but not in cache..
what was the problem why it was patched with default config and the choosing of data/cache/propel path?0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,048 ⚖️ - Guardians (admin)
Main problem was that the propel update required some kind of mapping file now. But make this new path required on project level creates noise whenever somebody updates the project and does not know why he/she is now getting an exception. Since the propel paths are not touched in most projects anyway the goal was to set a default which CAN be adjusted, but not required anymore. The path-change itself follows an agreement of not having cached things inside /src folder anymore. so new code should not add additional cached files there like the new propel-conf. So one of the IDEAS is to move more out of /src and into /data folder
1 -
ok, understood. Thanks a lot for clarifing..
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 65 Spryker News
- 879 Developer Corner
- 743 Spryker Development
- 84 Spryker Dev Environment
- 360 Spryker Releases
- 3 Oryx frontend framework
- 33 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 22 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 68 Spryker Safari Questions
- 50 Random