I wanted a rule to work only on the frontpage, but I can't do that since the path can't be empty. I ended up changing the module code. Perhaps other people face this issue as well?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | pathrules-support-front-page-with-equals-2057895-4-D7.patch | 1 KB | jp.stacey |
| #3 | pathrules-support-front-page-with-equals-2057895-3-D7.patch | 1020 bytes | jp.stacey |
| #1 | 2057895-1-support-front-page.patch | 1.32 KB | jessehs |
Comments
Comment #1
jessehsI edited the issue to reflect the approach in the patch.
Comment #2
jp.stacey commented@jessehs +1 - thank you, this is exactly what we've just been hoping to solve. Ideally the "value" would be non-required: when we edit the code to permit that, then a path of "" matches the front page! However, perhaps that has undefined behaviour when the operator is not "equals", so non-required isn't always safe.
For some reason your patch failed for me on the 'description' hunk, so please find a re-rolled patch. I have also changed == for === in your comparison: I think the latter is more in line with good practice recently mentioned by some core dev or other, because it avoids PHP casting ambiguity.
Comment #3
jp.stacey commentedSorry, re-rolled patch attached now.
Comment #4
jp.stacey commentedThe last patch did not apply cleanly during drush (re-)make, so I've re-rolled without the --no-prefix option and attached.
Comment #5
Poieo commentedVery simple and working well.
Comment #7
paranojik commentedCommited. Thanks everybody!
Comment #8
paranojik commentedComment #10
paranojik commentedThis should be fixed.