-
Notifications
You must be signed in to change notification settings - Fork 154
Fixed internal server error for query urlResolver #445
Fixed internal server error for query urlResolver #445
Conversation
@yogeshsuhagiya |
…sh-1 Changed canonical_url to relative_url
Hi @naydav , can you help with the following issue?
|
Hi @naydav, can you please review this PR? |
1 similar comment
Hi @naydav, can you please review this PR? |
@galaoleksandr |
Hi @yogeshsuhagiya Sorry for a delay, it is because that current milestone is devoted to |
…aphql-PR-yogesh-2
dev/tests/api-functional/testsuite/Magento/GraphQl/UrlRewrite/UrlResolverTest.php
Show resolved
Hide resolved
@yogeshsuhagiya Hello. Tried to use wrong request path, but no error message appeared. |
Hi @galaoleksandr, currently I'm writing the Test Case. I'm sure you'll definitely face this message. |
@@ -73,6 +74,11 @@ public function resolve( | |||
$url = $customUrl ?: $url; | |||
$urlRewrite = $this->findCanonicalUrl($url); | |||
if ($urlRewrite) { | |||
if (!$urlRewrite->getEntityId()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We hide errors here.
Simple example:
- Create Custom URL Rewrite
Request Path: go-to-admin
Target Path: /admin
Redirect Type: No - Perform query:
query{
urlResolver(
url: "go-to-admin"
) {
id
relative_url
type
}
}
For this case expected response in Internal Server Error which means
Exception #0 (LogicException): Front controller reached 100 router match iterations
but we simply got "No such entity found with matching URL key: go-to-admin"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to rely on Magento error handling then just check if our response is casting to true
or false
? @naydav?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exception #0 (LogicException): Front controller reached 100 router match iterations
Looks like it's bug in Magento. expected result: 404 Page not found
Does everything else work?
Generally it works for redirect type 'No'. But hides the error if problem occurred during request. |
@yogeshaureatelabs, could you please update your fork. You can do it easily by following these steps: # check connected remotes
git remote -v
# add upstream remote if not configured. ("mainline" is just a name. The default remote is always called "origin")
git remote add mainline https://github.com/magento/graphql-ce.git
# download from the remote
git fetch mainline
# check the current active branch
git branch
# checkout to 2.3-develop of your fork
git checkout 2.3-develop
# merge changes from the upstream to your fork
git merge mainline/2.3-develop
# optionally push everything or just commit and go to next step
git push origin 2.3-develop
# checkout to the branch of your PR
git checkout 2.3-develop-graphql-PR-yogesh-2
# merge 2.3-develop to your branch
git merge 2.3-develop
# Update pull request. It will trigger travis tests automatically.
git push origin 2.3-develop-graphql-PR-yogesh-2 |
@TomashKhamlai Sure |
Hi @TomashKhamlai |
Hi @TomashKhamlai, @naydav will anyone please let me know how much more time needs to process this PR because approx 50 days have been already passed but still waiting. |
@yogeshsuhagiya, sorry for the delays. I will try to explain what is happening now and how it has influence on PR processing. Magento follows practices for backward compatible development. This requires from developers to concentrate all the effort on little component and avoid mistakes that will be hard or even impossible to fix after release. So there is a difference between magento2(deliver fixes as soon as possible, improve the existing functionality) and graphql-ce(create functionality, do less but do best and cover everything with tests like a mad :) ) PR processing. I haven't seen any roadmap documented (doesn't mean that it doesn't exist) but now the main focus is around the checkout process and bug fixing. As far as I know next prioritized PRs will be related to My Account activity. For keeping track on the Community activity the best option is to join the weekly #graphql synс-up that is held on Tuesdays and participate in Slack channel. You can get more information on our Magento Community Engineering Slack #graphql We appreciate your work and your patience. You are not alone: |
@naydav, I mentioned about error-masking. If it is allowed, I would accept this PR. From my point of view it would be better even to mask this issue magento/magento2#21580 too. Functionally works. Negative testing was performed |
…aphql-PR-yogesh-2
Hi @yogeshsuhagiya, thank you for your contribution! |
Description (*)
relative_url
based on target path.Fixed Issues (if relevant)
Manual testing scenarios (*)
1. Create Custom URL Rewrite
2. Perform query:
3. Result:
Contribution checklist (*)