Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Jan 2026 at 09:41 UTC
Updated:
17 Mar 2026 at 10:30 UTC
Jump to comment: Most recent
Comments
Comment #2
quietone commentedComment #5
sujal kshatri commentedreplaced http://test.com and http://www.test.com with their https equivalents.
Changes were made using the following commands:
After applying the changes, running:
returned no results.
Comment #6
sujal kshatri commentedComment #7
sujal kshatri commentedtestUrlFilterContent is getting failed
Filter Kernel (Drupal\Tests\filter\Kernel\FilterKernel)
✔ Align filter
✔ Caption filter
✔ Align and caption filters
✔ Line break filter
✔ Line break filter twig debug
✔ Html filter
✔ No follow filter
✔ Html escape filter
✔ Url filter
✘ Url filter content
i am not able to understand why this test is failing,
i need some guidance as to how to fix this
Comment #8
dcam commentedThe problem is in
core/modules/filter/tests/filter.url-output.txt. This file represents what a block of text should look like after the filter module has acted on it. One of the applied filters turns URLs that are written in the text into anchor links. If a URL does not have a scheme (http:// or https://), then it will prepend "http://" to its URL in the anchor. You replaced all of these with https://, so the expected text no longer matches.Comment #9
sujal kshatri commentedThanks for explaining, which means I should only fix the test output by changing the https:// links back to http:// in filter.url-output.txt?
Does filter.url-input.txt file also need a change?
Comment #10
dcam commentedCorrect.
Comment #11
quietone commented@sujal kshatri, thanks for working on this. Are you willing to try again?
I think there is a misunderstanding here. The file
filter.url-output.txtdoes need to be changed because the input file for the test,core/modules/filter/tests/src/Kernel/FilterKernelTest.php, changed. But not all instances of http should be changed to https. So, which ones to change? The ones that have a protocol in the link text.For example,
<a href="http://www.test.com">www.test.com</a>does not change but<a href="http://www.test.com">http://www.test.com</a> changes to <code><a href="https://www.test.com">https://www.test.com</a>Comment #12
sujal kshatri commentedOh, so that was where i was going wrong
I'll make the changes
Comment #13
sujal kshatri commentedI did it manually for
filter.url-output.txt, no grep commands were used so if any of http still get left that needs a change then do let me knowComment #14
sujal kshatri commentedAlso there is a line in
filter.url-output.txtThe old URL filter has problems with <a title="kind of link www.example.com with text" href="https://www.example.com">this kind of link</a> with www address as part of text in title.earlier here it was http , i changed it to https , did i do the right thing ?
Comment #15
sujal kshatri commentedThe old URL filter has problems with <a title="kind of link www.example.com with text" href="https://www.example.com">this kind of link</a> with www address as part of text in title.i think here i should have kept it as http only because there's it doesn't have a protocol in the link text
Comment #16
sujal kshatri commentedFinally the pipeline passed!!
Comment #18
dcam commentedThank you for your hard work, @sujal kshatri.
I searched core for any additional references to
http:\/\/(www\.)?test\.com. I believe I found four more that need to be changed. I left suggestions for them in the MR. I'm setting the status to Needs Work for you to consider them.Comment #19
sujal kshatri commentedThank you so much for the review
Initially I did change them , but these were the reason the
Filter Kernelwas failing again and again , and also @quietone told to only change which have a protocol in link text, so i had to revert back, these 4 were the one i had doubt in.Comment #20
sujal kshatri commentedThe error was something like:-
Comment #21
sujal kshatri commentedJust let me know if i should change these four as well, I'll happily make the changes ,I just want a final confirmation ,
Comment #22
dcam commentedI interpret @quietone's comment a little differently. URLs that aren't enclosed in anchor tags should still be changed. We just needed to be careful about what we do with the URLs that would be processed by the filter module. URLs wrapped in code tags or in comments should not be processed. We can go ahead and change them from http:// to https://.
For what it's worth, when I applied those four changes on my local environment and ran the
FilterKernelTestit passed. You might apply the suggestions and give it a shot. If they don't work correctly, then they can always be reverted. I can try to help you figure out what went wrong with it too.Comment #23
sujal kshatri commentedApplied the suggestions, Yours
FilterKernelTestpassed then i believe then it should work correctly, Thanks for the suggestions :)Comment #24
sujal kshatri commentedIt worked!!! All green, Thank you so much for those suggestions, will be forever grateful
Comment #25
dcam commentedYou've done a good job here, performing due diligence to ensure everything is working correctly and to accept feedback. Thank you for being a helpful contributor. Please keep up the good work!
And now for my part: I have verified that the only remaining instances of
http:\/\/(www\.)?test.comin Core are those that are supposed to be there for testing the filter module. These changes look good to me.Comment #26
dcam commentedHit me up on the Drupal Slack if you need help finding another issue to work on.
Comment #27
quietone commentedAssigning to myself to possible commit in 24 hours, it is too late in the day for me to do a proper review.
Comment #28
sujal kshatri commented@dcam Thanks for positive review ,You were great too especially your helpfull nature, helping me with guidance and suggestions were very helpful, thanks to @quietone as well,
your slack id is @dcam right?
Comment #29
dcam commentedYes
Comment #32
thirteenthdown commentedI have updated all occurrences of http://test.com and http://www.test.com to https across the codebase. As instructed, I explicitly excluded the vendor/ and node_modules/ directories.
Comment #33
quietone commented@thirteenthdown, Welcome! The status of this issue was 'RTBC' when you started working on it. That means that this was reviewed and tested by the community and considered ready for commit. At this stage, the issue does not need another Merge Request. Your work is duplicating the work done by @sujal kshatri. Before working on an issue it is expected that all contributors read the issue summary and comments to understand what needs to be done. That allows us to build on each other work and not duplicate work.
As a new member of the community, I suggest you consult the Drupal Contributor Guide for tutorials on working on issues and other tasks in our community.
Comment #36
quietone commentedI am now going to hide the latest, duplicate MR, close it and restore the status of this which was set by a core subsystem maintainer.
Comment #39
quietone commented@sujal kshatri, Thanks for continuing to work on this until it was RTBC! Commenting one what actions you took, including the commands, and questions, makes it easier for others to understand. And, as you can see we all have different ways of saying things, which can sometimes add confusion. Again, thanks for staying with this. And you detailed comments are most welcome in our community.
Committed to main and 11.x. Thanks!
I noted that the failing test is core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php which is a know random failure, listed at #2829040: [meta] Known intermittent, random, and environment-specific test failures
Comment #41
thirteenthdown commentedYes I directly jumped in doing MR @quietone as I believed and misinterpreted these issues to be an open mock issue for all the first timers. I wont repeat this thing again and will look forward to contribute the right way in future. Thanks )
Comment #42
quietone commented@thirteenthdown, thanks for letting us know!