What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hey team, I have been stuck on this problem for too long. We have our module is not in "spryker-b2c/
Hey team, I have been stuck on this problem for too long.
We have our module is not in "spryker-b2c/src/Pyz/Zed". It is our own directory, "our-directory/src/Directory/Zed". Our project requires us to change our Directory name.
However, when changing our name from "Directory" to anything else, the file "Zed/Router/codeBucketUS/Pyz/url_generating_routes.php"
no longer generates a route for our module.
Because of that, we get the error: Symfony\Component\HttpKernel\Exception\NotFoundHttpException - No route found for "POST <our module's URL route>"
My question is, why does Spryker no longer generate routes for our module when we change the name of the namespace? Is there a fix for this, and if so, where can we configure that?
Comments
-
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 βοΈ - Guardians (admin)
Hey, stupid question but just to be sure: When you changed the folder-name you also updated the config_default.php, right? (and maybe composer autoload-dump)
0 -
Yep! I changed the name in the core namespaces.
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 βοΈ - Guardians (admin)
core namespaces? Should imo be in
$config[KernelConstants::PROJECT_NAMESPACES]
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 βοΈ - Guardians (admin)
- you also executed
docker/sdk console cache:empty-all
right?
0 - you also executed
-
Yes I did. Also, putting our directory namespace in project namespaces breaks our original code
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 βοΈ - Guardians (admin)
but it worked with the previous name or is it the first time you want to use something other than βPyzβ ?
0 -
We have a previous name other than "Pyz" that does work. We need to change it again but once we do, our Zed route is no longer generated
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 βοΈ - Guardians (admin)
ok hm. strange. I can not debug it by myself before Thursday.
Just one last idea: try
docker/sdk console cache:class-resolver:build
ordocker/sdk console router:cache:warm-up:backoffice
0 -
Unfortunately that did not work. I appreciate your time. I'll keep taking a look at it
0 -
If you wanna use your own vendor, you have to add it to many classes on Pyz. Some examples KernelConfig, PropelConfig, RouterConfig (this could be your problem), SearchElasticSerachConfig, TransferConfig, TranslatorConfig, TwigConfig, ZedNavigationConfig and also you have to add the namespace the shop config
0 -
The solution was to add the path to getControllerDirectories() in RouterConfig. Thank you everyone for the help!
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 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
- 70 Spryker Safari Questions
- 50 Random