I have SecurePages set to secure every page except for a list of exceptions. I am having a hard time making exceptions for regular pages. Here's an example:
I have a blog section. The /blog page is rendered by a Panel. It lists individual blog posts. Using the following settings, I would expect that /blog and all of the individual blog pages (under /blog/xxxx) would NOT be forced to a secure version:
blog
blog/*
The blog listing page works fine, but each individual blog post is using https (meaning the exception is not being caught).
I have also tried to exempt individual blog posts by adding their alias to the exception list, and that fails.
Looking at the code, it appears that $path_alias = drupal_get_path_alias($path); is never called in if ($page) check, so $path_alias is never populated.
I will supply a patch for this shortly.
Comment | File | Size | Author |
---|---|---|---|
#3 | securepages-pathauto_issues-2347127-1.patch | 592 bytes | Winn |
Comments
Comment #1
JuliaKoelsch CreditAttribution: JuliaKoelsch commentedActually, it's just missing one character:
line 254 in securepages.module is
$path_alias = isset($path_alias) ? drupal_get_path_alias($path) : $path_alias;
and it should be
$path_alias = !isset($path_alias) ? drupal_get_path_alias($path) : $path_alias;
Comment #2
Winn CreditAttribution: Winn commentedThe fix proposed in #1 has allowed us to use our site in mixed mode (http & https).
Comment #3
Winn CreditAttribution: Winn commentedComment #4
Winn CreditAttribution: Winn commentedPatch from #1
Comment #5
pjcdawkins CreditAttribution: pjcdawkins commentedThe patch looks good to me. Setting to 'Needs review'
Comment #6
mcdruidThe simple patch in #3 (negating the ternary check) makes securepages work with paths which are a url_alias.
Marking as RTBC as I'm the 3rd person to confirm this fixes the bug.
Comment #7
jennypanighetti CreditAttribution: jennypanighetti commentedWorks for me as well. I really wish the dev of the module would be updated more recently than 2013.
Comment #8
DuneBL#3 plays nicely for me!