The Needs Review Queue Bot โ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.
- Status changed to Needs review
almost 2 years ago 6:21pm 31 January 2023 - ๐บ๐ธUnited States agarzola
Something caused the previous 9.x patch not to pass tests in 9.5. Tooling in 9.5 causes the non-ES6 version of the file to _not_ get blank lines around the conditional.
This new patch should apply cleanly to 9.5.x.
- Status changed to Needs work
almost 2 years ago 11:27am 7 February 2023 The Needs Review Queue Bot โ tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide โ to find step-by-step guides for working with issues.
- Status changed to Needs review
almost 2 years ago 11:32am 7 February 2023 - Status changed to Needs work
almost 2 years ago 6:05pm 15 February 2023 - ๐บ๐ธUnited States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request โ as a guide.
As a bug this could use a test case.
Also issue summary should be updated with proposed fix.
- last update
10 months ago Custom Commands Failed - Issue was unassigned.
- Status changed to Needs review
10 months ago 5:37am 19 January 2024 - Status changed to Needs work
10 months ago 5:44am 19 January 2024 The Needs Review Queue Bot โ tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request โ . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- Merge request !7629Issue #2902769: active-link.js throws JS error if query string parameter contains a single quote โ (Open) created by keshav patel
- ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
I debugged this for a while and here are some points that i observed:-
1)$generated_link = $link_generator->generate($element['#title'], $element['#url']->setOptions($options));
in
Link.php is called twice for the link.For the first time it get the wrong element without the data drupal selectors but it does not attach that to the markup(which is on the next line).For the second time when this is called again$element['url']->setOption('set_active_class', TRUE);
sets the class to true which inturn sets the correct data attributes to the element and then attaches it to the mark-up in$element['#markup'] = $generated_link;
in Link.php.
2)With the correct element set at the PHP side It still does not correctly render the element in the markup.Just wanted to confirm if I am on the right track of figuring out what could be the issue?
- ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
Re #45
The way PHP renders the links and their attributes is fine. This was correctly reported as a JavaScript issue and that's where the solution will be.The specific issue is JavaScript is not adequately finding those links when they use special characters. If the JS query string escapes special characters in the same way PHP does, then it will get a match and work properly.
Use the steps in #44 to make a link that will reproduce the problem as reported, and the solution is modifying the JS. In fact The solution will likely be modifying the same line as the prior patches, but instead of just removing special characters, it converts it to the encoding that allows it to match the expected link and add the "is active" class.
- ๐บ๐ธUnited States SocialNicheGuru
Conflicts with committed patch for ๐ JS errors from Drupal.behaviors.activeLinks (... is not a valid selector) Needs work
- First commit to issue fork.
- ๐ฎ๐ณIndia nayana_mvr
I think the fix for the ticket mentioned in #47 ๐ active-link.js throws JS error if query string parameter contains a single quote Needs work fixes the issue mentioned in this ticket as well. I applied the changes of that ticket in Drupal 11.0.x and it fixed the js error mentioned here. I didn't verify that initially thatโs why I added a commit into the MR here. Maybe someone else can also verify it once so moving it to Needs Review.
- ๐บ๐ธUnited States smustgrave
Please read the tags and pipeline status before putting into review.
- ๐ฎ๐ณIndia nayana_mvr
This issue is not reproducible in Drupal 11.x. verified it with frosh Drupal 11.x setup. Attaching SS for reference. I have mentioned the same in my previous comment #49 ๐ active-link.js throws JS error if query string parameter contains a single quote Needs work . I think this ticket can be closed since it is already fixed along with https://www.drupal.org/project/drupal/issues/3464340 ๐ JS errors from Drupal.behaviors.activeLinks (... is not a valid selector) Needs work . I moved it to Needs Review so that someone else can also verify it once.