I have a site that's using SecurePages module. I noticed on IE that I kept getting an error about not all elements on the page being secure and wanted to know if I wanted to view only the secure elements or not. I finally got tired enough of those messages that I investigated. It appears like it is coming from this line in Omega's html.tpl.php:
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
In my particular case on my current project, all pages are secure, so I simply created an html.tpl.php file in my subtheme and changed 'http:...' in the line above to 'https:...' and no more messages! However, I know that having all pages secure is generally not the case, users are bounced back and forth between secure and non-secure pages.
I may be missing something here, but shouldn't Omega be checking if the page is secure and then, if so, change the protocol to use?
Comment | File | Size | Author |
---|---|---|---|
#15 | relative-src-15.patch | 698 bytes | lex0r |
Comments
Comment #1
bocaj CreditAttribution: bocaj commentedSorry, marked the wrong version!
Comment #2
design4effect CreditAttribution: design4effect commentedAn easy way to do it is to just eliminate 'http' or 'https' and write the url starting '//htmlshiv...'.
Your browser will use whatever you used to connect to that page.
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
Slick eh?
- Kent
Comment #3
fubhy CreditAttribution: fubhy commentedThe problem with this is that we add it to the .tpl directly. I feel like we should add it via drupal_add_js instead so the path can be adjusted on the fly. I talked to himerus about that before. Let's see how he feels about it now.
Comment #4
bocaj CreditAttribution: bocaj commentedYeah, I was looking in every place I possibly could for a drupal_add_js function that set this. Only after an hour or so of searching did I think to look in the .tpl files. It makes sense to me to have it called via drupal_add_js. Then the issue, as fubhy already pointed out, would be taken care of and "adjusted on the fly".
Comment #5
tanitani CreditAttribution: tanitani commentedYes, but how do you do that, as drupal_add_js does not have conditional option like drupal_add_css has, AFAIK.
Comment #6
himerus CreditAttribution: himerus commentedAnyone have a solution/patch for this one?
If anyone can post a viable solution here, I'll gladly add it. Mark back to active when ready for testing.
Comment #7
ardih CreditAttribution: ardih commentedsubscribe to this. solution #2 worked for me, copied the .tpl file to my own template dir, so as not to change it directly in the omega module. should get fixed in future versions.
Comment #8
Cellar Door CreditAttribution: Cellar Door commentedLooking in 3.1 it seems to be that this is already incorporated into the html.tpl.php Closing for now and will re-open if it comes up again.
Comment #9
mrfelton CreditAttribution: mrfelton commented@Cellar Dorr: Is it? http://drupalcode.org/project/omega.git/blob/refs/heads/7.x-3.x:/omega/t.... Looks like the same old code to me.
Comment #10
star-szrI don't see any issue with what is proposed in #2 - using a protocol-relative URL is what html5shiv recommends. The reference link is broken, but here's a blog post.
Comment #11
bocaj CreditAttribution: bocaj commentedYeah, looks like #2 would solve the issue to me as well and is the recommended approach!
Comment #12
himerus CreditAttribution: himerus commentedOkay, so this has been committed.
However, for ANY theme that has customized html.tpl.php, this will need to be manually modified in order to properly work.
Comment #13
himerus CreditAttribution: himerus commentedComment #15
lex0r CreditAttribution: lex0r commentedFor those of you who didn't manage to upgrade to the latest omega and regression test it on live clients.
here is the patch for 3.1.
Comment #16
star-szrSee also #1595062: Don't serve html5shiv from Google code repository which solves the issue in a different way, although the actual html5shiv.js in the patch is probably a bit out of date by now.
Comment #17
kopeboy CreditAttribution: kopeboy commentedGuys, I put the html.tpl.php file in my subtheme after having upgraded to Omega 7.4.2 and now my site shows a blank page.
After I deleted the added file the site still stays blank!
Can anybody help on this? I don't know what to do since I can't see admin pages or anything..
Seems like having put the file has generated something else that I still need to cancel to return to how the site was working before.
Thanks in advance
Comment #18
kopeboy CreditAttribution: kopeboy commentedComment #20
fubhy CreditAttribution: fubhy commentedPlease don't re-open closed issues. Always open a new issue for a new problem. Please also review the issue queue handbook for setting the issue metadata: https://drupal.org/node/317 - "Needs Review" means that there is a patch that requires reviewing. This is not the case here.
Regarding your blank page:
Why did you copy the html.tpl.php from Omega 3 into an Omega 4 theme? They are not compatible. It makes even less sense because this was only a problem in Omega 3. We now don't even serve html5shiv from Google anymore and instead serve it as a library (e.g. from sites/all/libraries).
In order to get your site back you will have to clear your cache (drush cc all)