- πΊπΈ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.
This could use an issue summary update for the proposed solution, specifically what is it? You listed edge cases but not how it was being solved.
- Status changed to Needs review
almost 2 years ago 7:56pm 14 February 2023 - π©π°Denmark arnested
Thank you for providing feedback. That sounds like a very nice initiative.
I have extended the description with a bit more info on what the patch does (basically just hardening a regular expression and adding more test data covering the discovered edge cases).
I also made sure the patch still applies cleanly to the 10.1.x branch, and has just scheduled a new test run against 10.1.x as well.
- Status changed to RTBC
over 1 year ago 7:43pm 15 February 2023 - πΊπΈUnited States smustgrave
Updated the issue summary more with the default template
Changes look good though and have additional test coverage.
The last submitted patch, 15: drupal-file_url_transform_relative_edge_case_errors-2983058-15.patch, failed testing. View results β
- Merge request !3758Issue #2983058: FileUrlGenerator::transformRelative() edge case errors β (Open) created by arnested
- Status changed to Needs work
over 1 year ago 4:06pm 30 March 2023 - Status changed to RTBC
over 1 year ago 5:04pm 30 March 2023 - Status changed to Needs work
over 1 year ago 4:58am 4 April 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Looking great, very comprehensive
I think we need use preg_quote on the base path too - see MR for explanation.
Thanks again.
- Status changed to Needs review
over 1 year ago 11:36am 4 April 2023 - π©π°Denmark arnested
Thank you for your feedback @larowlan β .
You are quite right. We need to preg_quote the base path as well.
I went even further and also added preq_quote to the port. Although we would expect a number, Request::getPort() could return a string (we would still expect the string to hold a number, but this issue was created based on weird input, so I think it is better to be safe).
I added a test using a path with "weird" characters to make sure the quoting is in place.
- Status changed to RTBC
over 1 year ago 3:27pm 5 April 2023 - πΊπΈUnited States smustgrave
Can see the threads in the MR have been addressed.
- Status changed to Needs work
over 1 year ago 1:22am 6 April 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
One more comment on the MR, I think we're missing one test case for when the URL ends in a /
- Status changed to Needs review
over 1 year ago 7:14am 6 April 2023 - π©π°Denmark arnested
I have added a test case with a trailing slash on the hostname, @larowlan β .
- Status changed to RTBC
over 1 year ago 2:20pm 6 April 2023 - Status changed to Needs work
over 1 year ago 9:25pm 10 April 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I ran the test through locally with the debugger attached, and none of the cases had a value for $base_path, in every instance it was an empty string.
In this comment on the MR I asked for some changes to base path and test coverage for it.
I suspect we will need to pass in an additional parameter to set a base path.
- π©π°Denmark arnested
Ah, now I understand, @larowlan β . I misread your remark regarding base path as just the path... Don't why. Re-reading it now, and it's quite obvious what you meant. I'll look into it. It might some days before I can find the time for it, though.
- π©π°Denmark arnested
Ok, took a stab at it now. Tests work on my machine now, but it's way past my bedtime, so I'll have to wait until tomorrow morning to see if Drupal CI agrees, and I can put it into Needs review again.
Thank you once again for the valuable feedback, @larowlan β .
- Status changed to Needs review
over 1 year ago 11:21pm 10 April 2023 - Status changed to Needs work
over 1 year ago 12:19am 16 April 2023 - πΊπΈUnited States smustgrave
Let me know if this was a wrong test.
Drupal standard install of 10.1
Added breakpoint to transformRelative on the last line
Added an image to the article field.
Breakpoint stops but base_path is always empty.There additional steps I should take?
- π©π°Denmark arnested
The base path only has a non-empty value if you install Drupal in a sub-folder.
That is the the difference between where the Drupal root/index.php is located: https://example.com vs https://example.com/here/is/drupal
- Status changed to Needs review
over 1 year ago 12:41pm 16 April 2023 - Status changed to RTBC
over 1 year ago 11:56pm 22 April 2023 - πΊπΈUnited States smustgrave
Was able to circle back on this. Relooking at the change think all the points have been addressed.
- last update
over 1 year ago 29,316 pass - last update
over 1 year ago 29,318 pass 38:10 36:56 Running- last update
over 1 year ago 29,380 pass - last update
over 1 year ago 29,380 pass - last update
over 1 year ago 29,385 pass - last update
over 1 year ago 29,392 pass - last update
over 1 year ago 29,393 pass - last update
over 1 year ago 29,394 pass - last update
over 1 year ago 29,397 pass - last update
over 1 year ago 29,402 pass - last update
over 1 year ago 29,402 pass - last update
over 1 year ago 29,379 pass, 2 fail - last update
over 1 year ago 29,402 pass - last update
over 1 year ago 29,401 pass, 2 fail - last update
over 1 year ago 29,401 pass, 2 fail - last update
over 1 year ago 29,409 pass - last update
over 1 year ago 29,413 pass - last update
over 1 year ago 29,413 pass - last update
over 1 year ago 29,414 pass - last update
over 1 year ago 29,423 pass - last update
over 1 year ago 29,423 pass - last update
over 1 year ago 29,429 pass - last update
over 1 year ago 29,434 pass - last update
over 1 year ago 29,434 pass - last update
over 1 year ago 29,439 pass - last update
over 1 year ago 29,443 pass - Status changed to Needs work
over 1 year ago 2:25am 16 June 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Needs a rebase on 11.x
- πΊπΈUnited States smustgrave
Wonder why the review bot didnβt catch it
- last update
about 1 year ago 29,686 pass - Merge request !5045Issue #2983058 by arnested, larowlan, smustgrave, ranjith_kumar_k_u:... β (Closed) created by arnested
- last update
about 1 year ago 30,431 pass - Status changed to Needs review
about 1 year ago 10:12pm 18 October 2023 - π©π°Denmark arnested
Greetings from DrupalCon Lille 2023!
I have rebased the merge request in 11.x.
All tests are still green.
I'm not sure whether I'm allowed to put the status back to Reviewed & tested by the community myself. So I'm putting on Needs review instead.
- Status changed to RTBC
about 1 year ago 2:07pm 19 October 2023 40:29 2:19 Running- last update
about 1 year ago 30,439 pass - last update
about 1 year ago 29,686 pass - last update
about 1 year ago 30,439 pass - last update
about 1 year ago 30,440 pass - last update
about 1 year ago 30,440 pass - last update
about 1 year ago 30,440 pass - last update
about 1 year ago 29,686 pass - last update
about 1 year ago 29,688 pass - last update
about 1 year ago 30,448 pass - last update
about 1 year ago 30,452 pass - last update
about 1 year ago 30,470 pass - last update
about 1 year ago 30,486 pass - last update
about 1 year ago 30,497 pass - last update
about 1 year ago 30,499 pass - last update
about 1 year ago 30,500 pass - last update
about 1 year ago 30,502 pass - last update
about 1 year ago 30,525 pass - last update
about 1 year ago 30,532 pass - last update
about 1 year ago 30,544 pass - last update
about 1 year ago 30,560 pass, 2 fail - last update
12 months ago 30,588 pass - last update
12 months ago 30,616 pass - last update
12 months ago 30,619 pass - last update
12 months ago 30,648 pass - last update
12 months ago 30,689 pass - last update
12 months ago 30,692 pass - last update
12 months ago 30,697 pass, 2 fail - last update
12 months ago 30,702 pass - last update
12 months ago 30,702 pass - last update
12 months ago 30,702 pass 53:10 48:41 Running- last update
11 months ago 30,712 pass - last update
11 months ago 30,726 pass - last update
11 months ago 30,738 pass - last update
11 months ago 30,778 pass - last update
11 months ago 30,780 pass - last update
11 months ago 25,931 pass, 1,829 fail - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
larowlan β changed the visibility of the branch 10.1.x to hidden.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
larowlan β changed the visibility of the branch 2983058-fileurlgeneratortransformrelative-edge-case to hidden.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
larowlan β changed the visibility of the branch 11.0.x to hidden.
-
larowlan β
committed 8165b07e on 10.2.x
Issue #2983058 by arnested, smustgrave, larowlan: FileUrlGenerator::...
-
larowlan β
committed 8165b07e on 10.2.x
-
larowlan β
committed 9fecb4b6 on 11.x
Issue #2983058 by arnested, smustgrave, larowlan: FileUrlGenerator::...
-
larowlan β
committed 9fecb4b6 on 11.x
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I ran the tests locally again with the debugger and confirmed that the base path is now being correctly set.
I ran them without the fix, and confirmed we're getting fails.
Took another deep review of it and went over it with a fine tooth comb locally just to make sure I wasn't missing anything.
I think this is good to go, its been a while from when I last looked at this, thanks for keeping it fresh @arnested
Committed to 11.x
Backported to 10.2.x
- Status changed to Fixed
11 months ago 8:00am 22 December 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π€ This likely explains some of the bug reports I've been getting in the CDN module! π€π
See π¬ CDN cannot find the image style images Postponed: needs info and especially π [upstream] Double slash in URL since upgrade to Drupal 10 Postponed: needs info . I've asked both to manually test again with a core release containing this or by applying this patch.
IMHO this deserves a backport to Drupal 10.1?
- Status changed to Fixed
11 months ago 9:59am 5 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.