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 there I'm somewhat stuck... I've implemented a GatewayController on the zed level. I think it is
Hey there I'm somewhat stuck... I've implemented a GatewayController on the zed level. I think it is correctly located. However the routes does not seem to get registered. Is there anything else, that i have to do? Like registering the controller manually? or adding a route?
Comments
-
Does
vendor/bin/console console router:cache:warm-up
solves your problem?0 -
Zed Controllers do not need to be registered
0 -
nope
0 -
does not help
0 -
You are using
AbstractGatewayController
right? It was one of my own latest things to get stuck on π0 -
yes
0 -
here the calling function;
/** * @param FirstSpiritDataImportJobTransfer $firstSpiritDataImportJobTransfer * @return DataImporterReportTransfer */ public function processDataImportRequest(FirstSpiritDataImportJobTransfer $firstSpiritDataImportJobTransfer) : DataImporterReportTransfer { $this->getLogger()->warning("Calling Zed with request to '/first-spirit-data-import/gateway/process-data-import-request'.", ["transferType" => $firstSpiritDataImportJobTransfer->getImportType()]); /** @var DataImporterReportTransfer $dataImporterReportTransfer */ $dataImporterReportTransfer = $this->zedRequestClient->call('/first-spirit-data-import/gateway/process-data-import-request', $firstSpiritDataImportJobTransfer);
here the gateway:
namespace FirstSpirit\Zed\FirstSpiritDataImport\Communication\Controller; ... some imports here ... /** * @method FirstSpiritDataImportFacadeInterface getFacade() */ class GatewayController extends AbstractGatewayController { /** * @param FirstSpiritDataImportJobTransfer $firstSpiritDataImportJobTransfer * @return DataImporterReportTransfer */ public function processDataImportRequestAction(FirstSpiritDataImportJobTransfer $firstSpiritDataImportJobTransfer) {
0 -
what console says:
[25-Nov-2020 15:05:53] WARNING: [pool worker] child 13 said into stderr: "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException: No route found for "POST /first-spirit-data-import/gateway/process-data-import-request" in file /data/vendor/symfony/http-kernel/EventListener/RouterListener.php on line 136" [25-Nov-2020 15:05:53] WARNING: [pool worker] child 13 said into stderr: "" [25-Nov-2020 15:05:53] WARNING: [pool worker] child 13 said into stderr: "Caused by" [25-Nov-2020 15:05:53] WARNING: [pool worker] child 13 said into stderr: "Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException: None of the routers in the chain matched this request" [25-Nov-2020 15:05:53] WARNING: [pool worker] child 13 said into stderr: "POST /first-spirit-data-import/gateway/process-data-import-request HTTP/1.1 "
0 -
do you have any clue how class and methodname would be translated?
0 -
I guess that the different namespace (FirstSpirit) will not be considered by the mechanism to find Zed controllers.
AbstractControllerResolver would be a good place to start debugging this through0 -
AbstractControllerResolver sounds good to me
0 -
thanks for the hint
0 -
In the end i've found the answer in the RouterConfig
0 -
namespace Spryker\Zed\Router;
0 -
in the end it was a typo
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
- 930 Developer Corner
- 788 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
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random