Moodle

Site Policy Agreement displays blank in ie6 and ie7

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9.1
  • Component/s: Unknown
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

The Site Policy Agreement window (that users must agree to when they first login to the site) appears blank in both IE6 and IE7, but displays fine in Firefox 2.

I tried using both an html file and a plain text file, but IE will not display either of them (but Firefox works fine).

I tried it using both the standard theme and the standardwhite theme and the results were the same.

I tried it from two different computers, one running WinXP Pro and the other running WinXP Home and the results were the same. I also tried it logging in with both an admin user and a normal student user and results were the same.

I have the site policy file located in mydomain.com/moodle/sitepolicy/sitepolicy.html . The Site Policy URL is obviously correct since it works in Firefox.

Issue Links

Activity

Hide
Jeff Sherk added a comment -

Here's a little bit more info...

The only thing I can figure out, is that it might be related to the use of the OBJECT tag. Internet Explorer does not deal with it properly.

My temporary fix was to change the OBJECT tag to an IFRAME tag:

Moodle version: 1.9
Modified file: moodle/user/policy.php
File version: policy.php,v 1.13 2007-08-17 19:09:27 nicolasconnault

Around line 47, I changed this:

echo '<object id="policyframe" data="'.$CFG->sitepolicy.'" type="'.$mimetype.'">';
// we can not use our popups here, because the url may be arbitrary, see MDL-9823
echo '<a href="'.$CFG->sitepolicy.'" onclick="this.target=\'_blank\'">'.$strpolicyagreementclick.'</a>';
echo '</object></div>';

To this:

echo '<iframe id="policyframe" src="'.$CFG->sitepolicy.'" >';
echo '</iframe></div>';

I really don't know much about the pros and cons of using the object tag versus the iframe tag, but all I know is that I can now view the Site Policy on IE6, IE7 and Firefox2

Show
Jeff Sherk added a comment - Here's a little bit more info... The only thing I can figure out, is that it might be related to the use of the OBJECT tag. Internet Explorer does not deal with it properly. My temporary fix was to change the OBJECT tag to an IFRAME tag: Moodle version: 1.9 Modified file: moodle/user/policy.php File version: policy.php,v 1.13 2007-08-17 19:09:27 nicolasconnault Around line 47, I changed this: echo '<object id="policyframe" data="'.$CFG->sitepolicy.'" type="'.$mimetype.'">'; // we can not use our popups here, because the url may be arbitrary, see MDL-9823 echo '<a href="'.$CFG->sitepolicy.'" onclick="this.target=\'_blank\'">'.$strpolicyagreementclick.'</a>'; echo '</object></div>'; To this: echo '<iframe id="policyframe" src="'.$CFG->sitepolicy.'" >'; echo '</iframe></div>'; I really don't know much about the pros and cons of using the object tag versus the iframe tag, but all I know is that I can now view the Site Policy on IE6, IE7 and Firefox2
Hide
Jeff Sherk added a comment - - edited

Could this possibly be related to the following issues?

http://tracker.moodle.org/browse/MDL-14541 (problem with object tage)

http://tracker.moodle.org/browse/MDL-9825 (problem with ufo.js javascript file)

Show
Jeff Sherk added a comment - - edited Could this possibly be related to the following issues? http://tracker.moodle.org/browse/MDL-14541 (problem with object tage) http://tracker.moodle.org/browse/MDL-9825 (problem with ufo.js javascript file)
Hide
Eloy Lafuente (stronk7) added a comment -

Hi Jerome,

can you take a look to this. I'm not 100% sure if iframe is the correct solution here (XHTML Strict problem?).

I'd suggest to prospect various posibilities:

1) Confirm IE problems.
2) Analyse if it's possible to download the policy file, get its <body> contents and display them inline. Sounds complex.
3) Conditionally, use iframe under IE with something like:
<!--[if IE]>
<iframe src="policy.html" ></iframe>
<![endif]-->. Ugly but perhaps the better solution.
4) Any cross-browser alternative you can imagine.

Awaiting for your research... TIA and ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi Jerome, can you take a look to this. I'm not 100% sure if iframe is the correct solution here (XHTML Strict problem?). I'd suggest to prospect various posibilities: 1) Confirm IE problems. 2) Analyse if it's possible to download the policy file, get its <body> contents and display them inline. Sounds complex. 3) Conditionally, use iframe under IE with something like: <!--[if IE]> <iframe src="policy.html" ></iframe> <![endif]-->. Ugly but perhaps the better solution. 4) Any cross-browser alternative you can imagine. Awaiting for your research... TIA and ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Hi,

I'd suggest to take a look to MDL-14541 . It's basically the same problem and there are some potential fixes there (that can be tested too to fix this).

Show
Eloy Lafuente (stronk7) added a comment - Hi, I'd suggest to take a look to MDL-14541 . It's basically the same problem and there are some potential fixes there (that can be tested too to fix this).
Hide
Jerome Mouneyrac added a comment -

I couldn't reproduce. The site policies are displayed on IE6+XP and IE7+Vista when I try login as a new user.

Jeff,
could you attach the policy file which is not displayed? Can you also give me your Admin>Security>Sites Policies settings?
Thanks.

Show
Jerome Mouneyrac added a comment - I couldn't reproduce. The site policies are displayed on IE6+XP and IE7+Vista when I try login as a new user. Jeff, could you attach the policy file which is not displayed? Can you also give me your Admin>Security>Sites Policies settings? Thanks.
Hide
Jeff Sherk added a comment -

I tried it with a plain old one line text file and it did not work either, but I can send my policy file to you. I don't see anyway to upload it on the tracker. Is there an email I can send it to?

Here are my Site Policy settings:

Protect usernames: YES
Force users to login: YES
Force users to login for profiles: YES
Open to Google: NO
Maximum uploaded file size: 2MB
Enable messaging system: YES
Allow EMBED and OBJECT tags: NO
Enable Trusted Content: NO
Maximum time to edit posts: 15 min
Full Name Format: First name + Surname
Allow extended characters in usernames: NO
Site policy URL: http://mydomain.com/members/sitepolicy/FMI-Terms-Of-Use-SOTP.html
Blog Visibility: Users can only see blogs for people that share a course
Enable tags functionality: YES
Keep tag name casing: YES
Cron execution via command line only: NO
Cron password for remote access: blank
Password Policy: NO
Password Length: 8
Digits: 1
Lowercase letters: 1
Uppercase letters: 1
Non-alphanumeric characters: 1
Disable User Profile Images: NO

Show
Jeff Sherk added a comment - I tried it with a plain old one line text file and it did not work either, but I can send my policy file to you. I don't see anyway to upload it on the tracker. Is there an email I can send it to? Here are my Site Policy settings: Protect usernames: YES Force users to login: YES Force users to login for profiles: YES Open to Google: NO Maximum uploaded file size: 2MB Enable messaging system: YES Allow EMBED and OBJECT tags: NO Enable Trusted Content: NO Maximum time to edit posts: 15 min Full Name Format: First name + Surname Allow extended characters in usernames: NO Site policy URL: http://mydomain.com/members/sitepolicy/FMI-Terms-Of-Use-SOTP.html Blog Visibility: Users can only see blogs for people that share a course Enable tags functionality: YES Keep tag name casing: YES Cron execution via command line only: NO Cron password for remote access: blank Password Policy: NO Password Length: 8 Digits: 1 Lowercase letters: 1 Uppercase letters: 1 Non-alphanumeric characters: 1 Disable User Profile Images: NO
Hide
Jeff Sherk added a comment -

Just another thought on this issue...

I was googling ie and the object tag, and I noticed that some people traced their problem to settings in IE (usually related to active x). I had the problem from two different computers though, one running ie6 and the other running ie7, so it seems strange that they would both do it!

I also read one other tracker issue that found that ufo.js was the cause, but I think it was pretty old.

Show
Jeff Sherk added a comment - Just another thought on this issue... I was googling ie and the object tag, and I noticed that some people traced their problem to settings in IE (usually related to active x). I had the problem from two different computers though, one running ie6 and the other running ie7, so it seems strange that they would both do it! I also read one other tracker issue that found that ufo.js was the cause, but I think it was pretty old.
Hide
Jeff Sherk added a comment -

After much hair pulling, I have at last FOUND THE PROBLEM!!!

In both ie6 and ie7 there is a default security setting that causes them both (by default) to NOT display anything in the site policy window. This is standard behaviour (in certain situations).

HOW TO REPRODUCE:

Go to

Tools-> Internet Options-> Security Tab

Click on Internet Zone then click on Custom Level

Scroll down to Miscellaneous, and note that Access To Data Sources Across Domains (by default) is set to DISABLED

If I change this to Enabled, then the Site Policy displays fine in both ie6 and ie7.

If you have this setting on Enabled, then set it to Disabled and see if the problem occurs.

----------

I'm not exactly sure what this setting actually does, and it may not affect all computers all the time, but it is a default behaviour, so it certain cases this could be an issue.

Hope this helps narrow down and resolve the problem.

Show
Jeff Sherk added a comment - After much hair pulling, I have at last FOUND THE PROBLEM!!! In both ie6 and ie7 there is a default security setting that causes them both (by default) to NOT display anything in the site policy window. This is standard behaviour (in certain situations). HOW TO REPRODUCE: Go to Tools-> Internet Options-> Security Tab Click on Internet Zone then click on Custom Level Scroll down to Miscellaneous, and note that Access To Data Sources Across Domains (by default) is set to DISABLED If I change this to Enabled, then the Site Policy displays fine in both ie6 and ie7. If you have this setting on Enabled, then set it to Disabled and see if the problem occurs. ---------- I'm not exactly sure what this setting actually does, and it may not affect all computers all the time, but it is a default behaviour, so it certain cases this could be an issue. Hope this helps narrow down and resolve the problem.
Hide
Helen Foster added a comment -

Hi Jeff,

I've tried with IE6 and failed to reproduce the problem you describe. I disabled access to data sources across domains but it made no difference - I could still see the site policy.

Show
Helen Foster added a comment - Hi Jeff, I've tried with IE6 and failed to reproduce the problem you describe. I disabled access to data sources across domains but it made no difference - I could still see the site policy.
Hide
Helen Foster added a comment -

Jerome, could you change the wording "Click here to read the Site Policy Agreement", perhaps to "Link to Site Policy Agreement" or similar.

Show
Helen Foster added a comment - Jerome, could you change the wording "Click here to read the Site Policy Agreement", perhaps to "Link to Site Policy Agreement" or similar.
Hide
Jerome Mouneyrac added a comment -

Helen: no problem I make the change

Jeff:
First I couldn't reproduce the bug. Then (thanks Martin) I put the policy file on another domain and IE displayed a blank field. I guess you have your policy file on another domain. Can you put your policy file on the same domain as Moodle?

Show
Jerome Mouneyrac added a comment - Helen: no problem I make the change Jeff: First I couldn't reproduce the bug. Then (thanks Martin) I put the policy file on another domain and IE displayed a blank field. I guess you have your policy file on another domain. Can you put your policy file on the same domain as Moodle?
Hide
Jeff Sherk added a comment -

RESOLVED!

Okay, I assumed it was on the same domain, since the link works fine from FIrefox, and it's in a subdirectory of my Moodle install. But...

Moodle is installed at http://www.mydomain.com/moodle

Site Policy URL at http://mydomain.com/moodle/sitepolicy

Notice that I did NOT use the www for the site policy url.

Even if I try to go to at http://mydomain.com/moodle, it always redirects to http://www.mydomain.com/moodle, so IE sees http://mydomain.com as a different domain from http://www.mydomain.com/moodle

I added the www to my site policy url, and it now works perfect from IE6, IE7 and Firefox2.

Thanks for the help in sorting this out.

----------

The only issue you have now, is if somebody HAS to have a site policy that is on a different domain. Obviously, this is not a Moodle problem, but perhaps it could be noted in the Security->Site Policy URL text?

Security->Site Policy URL text should read something like this:
If you have a site policy that all users must see and agree to before using this site, then specify the URL to it here, otherwise leave this field blank. The URL can point to anywhere - one convenient place would be a file in the site files. eg http://yoursite/file.php/1/policy.html. (NOTE: By default, Internet Explorer may display a blank screen if the Site Policy URL is located on a different domain than the domain that Moodle is installed on. To prevent problems for users, it is suggested that the Site Policy URL by on the same domain.)

I created a new issue so you can close this one:
http://tracker.moodle.org/browse/MDL-14752

Show
Jeff Sherk added a comment - RESOLVED! Okay, I assumed it was on the same domain, since the link works fine from FIrefox, and it's in a subdirectory of my Moodle install. But... Moodle is installed at http://www.mydomain.com/moodle Site Policy URL at http://mydomain.com/moodle/sitepolicy Notice that I did NOT use the www for the site policy url. Even if I try to go to at http://mydomain.com/moodle, it always redirects to http://www.mydomain.com/moodle, so IE sees http://mydomain.com as a different domain from http://www.mydomain.com/moodle I added the www to my site policy url, and it now works perfect from IE6, IE7 and Firefox2. Thanks for the help in sorting this out. ---------- The only issue you have now, is if somebody HAS to have a site policy that is on a different domain. Obviously, this is not a Moodle problem, but perhaps it could be noted in the Security->Site Policy URL text? Security->Site Policy URL text should read something like this: If you have a site policy that all users must see and agree to before using this site, then specify the URL to it here, otherwise leave this field blank. The URL can point to anywhere - one convenient place would be a file in the site files. eg http://yoursite/file.php/1/policy.html. (NOTE: By default, Internet Explorer may display a blank screen if the Site Policy URL is located on a different domain than the domain that Moodle is installed on. To prevent problems for users, it is suggested that the Site Policy URL by on the same domain.) I created a new issue so you can close this one: http://tracker.moodle.org/browse/MDL-14752
Hide
Eloy Lafuente (stronk7) added a comment -

So, to close this... only Helen's suggestion about to change the "Click here ..." text is needed, great! Thanks everybody.

Show
Eloy Lafuente (stronk7) added a comment - So, to close this... only Helen's suggestion about to change the "Click here ..." text is needed, great! Thanks everybody.
Hide
Jerome Mouneyrac added a comment -

patch commited on 1.9 and HEAD

Show
Jerome Mouneyrac added a comment - patch commited on 1.9 and HEAD
Hide
Helen Foster added a comment -

Thanks for everyones' comments and thanks to Jerome for fixing the wording

Show
Helen Foster added a comment - Thanks for everyones' comments and thanks to Jerome for fixing the wording

People

Vote (0)
Watch (4)

Dates

  • Created:
    Updated:
    Resolved: