-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[GraphQl] Route query infinite loop #39707
Comments
Hi @rybkinevg. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @rybkinevg, Thanks for your reporting and collaboration. We have tried to reproduce the issue in Latest 2.4-develop instance and we are not able to reproduce the issue.kindly refer the screenshot. ![]() We are getting response as null.could you please let us know if we are missing anything and please try to reproduce the issue in Latest 2.4-develop instance. Thanks. |
Hi, @engcom-Bravo ! Thanks for your reply, but I am confirming that the issue is reproducible in
![]() ![]()
![]()
{
route(url: "/test") {
relative_url
}
} ![]()
private function findFinalUrl(UrlRewrite $urlRewrite): UrlRewrite
{
$count = 0;
do {
$nextUrlRewrite = $this->findUrlFromRequestPath(
$urlRewrite->getTargetPath(),
(int) $urlRewrite->getStoreId()
);
if ($nextUrlRewrite) {
$urlRewrite = $nextUrlRewrite;
}
if ($count > 30) {
die('I am in an endless loop');
}
$count++;
} while ($nextUrlRewrite);
return $urlRewrite;
}
![]() UPD I also double checked that the |
@magento give me a 2.4-develop instance |
Preconditions and environment
Steps to reproduce
Magento Admin
->Marketing
->SEO & Search
->URL Rewrites
Add URL Rewrite
with following values:Create URL Rewrite
=Custom
Request Path
= testTarget Path
= testExpected result
Actual result
The request have been cycled in the infinite loop, and some day will fall with timeout
Additional information
The example above is synthetic, but custom URL rewrite entity types will be affected by this issue.
For example, if we have the
Blog
module withPost
entity, and we are not going to show posts via Magento frontend (so we do not have the frontend controllers) we will fetch them via GraphQl queries and show on the custom frontend.We will create the custom URL rewrite entity type and resolver for it:
Also we will create the URL rewrite entry for post with the following values:
Create URL Rewrite
=Custom
Request Path
= blog/some-post-titleTarget Path
= blog/some-post-titleWhen frontend will query the
route
it will fall with timeout.Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: