The isHomePath parameter is showing always false, even if the provided path is home path.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | interdiff_5-8.txt | 634 bytes | baikho |
| #8 | decoupled_router-3036392-8.patch | 3.18 KB | baikho |
| #5 | interdiff_3-5.txt | 1.81 KB | baikho |
| #3 | Screenshot 2019-03-09 at 13.12.55.png | 64.83 KB | baikho |
| #3 | interdiff_2-3.txt | 586 bytes | baikho |
Comments
Comment #2
rhristov commentedIt is because in resolvedPathIsHomePath $resolved_path is absolute url and $home_path is relative. Applying a patch that is converting the home path to absolute url.
Comment #3
baikho commentedAfter applying the patch,
isHomePathstill returnsFALSE, because the newly assigned variable$home_urldoesn't resolve to a URL. Subsequently then the end comparison still fails.See re-rolled patch which fixes
$home_urlto a URL string with manual test through Postman for which ie.node/3is set to be the front page.Comment #4
e0ipsoCan we add a test that fails before the code fix, and then passes after the code fix?
Comment #5
baikho commented@e0ipso thanks for your review.
I've added a
testHomPathCheckto theDecoupledRouterFunctionalTestclass. (See re-rolled patch)Comment #6
baikho commentedComment #7
e0ipsoThanks so much for this test. Only a minor question:
Why do we need to login as an admin user for this test?
Comment #8
baikho commentedGood point, no need for it. See re-rolled.
Comment #9
rhristov commentedSeems like when the site is multilanguage and for its detection is used domain based URL negotiator, as in my case, the URL is absolute without explicitly defining it, as it is done in #3.
Good catch Baik Ho.
Comment #11
e0ipsoMerged!