- Status changed to Needs review
almost 2 years ago 11:09am 30 January 2023 - Status changed to Needs work
almost 2 years ago 11:29am 30 January 2023 - ๐ฌ๐งUnited Kingdom longwave UK
Thanks for rerolling. This still needs a test to exercise the broken behaviour and prove that we have fixed it with the patch.
- ๐บ๐ธUnited States neclimdul Houston, TX
conflicts with ๐ Replace deprecated String.prototype.substr() with String.prototype.substring() Fixed . rerolled in a merge request. not sure what a test would look like so just the reroll atm.
- ๐บ๐ธUnited States pmagunia Philadelphia ๐บ๐ธ
The patch from #52 applied cleanly to Drupal 10.2.5.
- ๐ฎ๐ณIndia yash.rode pune
yash.rode โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia yash.rode pune
Hi, I was trying to reproduce this issue in Drupal Core, where I can click on any button which takes me to the link with a fragment?
I am trying to write the test, but not sure what should be the Drupal page where I can get this error which I can convert to test. - ๐บ๐ธUnited States neclimdul Houston, TX
Not sure of a common real case but I was able recreate this just now like this.
1. Install Drupal site.
2. Ensure registration is allowed.
3. Log out and visit the registration url with a complex url fragment. e.g. https://d10.lndo.site/en/user/register/#badfragment/broken - ๐ฎ๐ณIndia yash.rode pune
Hi I tried the steps above but the issue only occurs when we try to change the URL and not when we visit the URL for the first time?
If that is the expected behaviour how can we write a test for that scenario? - ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
Testing / reproducing is fortunately pretty simple. The callback where the problem is occuring is triggered by, among other things, clicking on an anchor link inside a form. Get this link into a form
<a href="#edit-contact/broken">This is an anchor link with a broken fragment</a>
then click it, and the error will appear in the console.And hopefully the issue summary can get updated soon as it is presents the issue as being specific to a file that has not been in Drupal for several years.
- ๐บ๐ธUnited States neclimdul Houston, TX
Thanks, yeah adding that link would be a simple way someone could see it.
Anyone could update issue summaries.
I tried reproducing this based on #58.
I added$form['anchor_link'] = [ '#type' => 'markup', '#markup' => '<a href="/#edit-contact/broken">This is an anchor link with a broken fragment</a>', ];
in
FormTestUrlForm
form and clicked on the anchor link inside the form.
This does not lead to any error on 11.x.Also it tried to edit the url and hit the url as mentioned in #57 ๐ Certain URL fragments cause javascript error Needs work by @yash.rode but then also there is no error in the console.
Also when following the same steps as mentioned by @yash.rode in #57 ๐ Certain URL fragments cause javascript error Needs work I was able to reproduce the same error as yash was able to get.The question here is am I missing something is steps to reproduce?
- Status changed to Needs review
4 months ago 10:59am 15 July 2024 - Status changed to Needs work
4 months ago 6:46pm 15 July 2024 - ๐บ๐ธUnited States neclimdul Houston, TX
I think this is documented and reviewed to death at this point. Its actually needs work because it needs tests as the tag suggests.
- ๐บ๐ธUnited States bnjmnm Ann Arbor, MI
Re #60
The question here is am I missing something is steps to reproduce?
Yes. The file where the error is happening needs to be loaded in order to reproduce the problem.
The error is occurring in
form.js
, but the form loaded byFormTestUrlForm
does not include that file.See core.libraries.yml for the library that includes this file and the libraries that depend on it.