Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.8, 1.9
-
Component/s: Resource
-
Labels:None
-
Environment:Windows XP, Internet Explorer 6.0.2600
-
Database:Any
-
Affected Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
-
Fixed Branches:MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
Description
I've had several reports from users that pages with embedded PDF's aren't displaying the PDF and leave a blank space where it should be. I've managed to trace the issue to the <object> tag.
I've found two fixes that reliably solve the issue for all my users.
1. Switch the <object> tag for an <iframe>, although I understand this isn't valid for the HTML level Moodle wishes to comply with.
2. Add <param name="src" value="' . $fullurl . '" /> within the object tag. I'm not 100% sure if this is valid to the HTML level we want.
A fix or possibly even a configuration to switch the method used would be great.
Issue Links
| This issue has a non-specific relationship to: | ||||
| MDL-14609 | Site Policy Agreement displays blank in ie6 and ie7 |
|
|
|
To update, I tested the following HTML in a valid XHTML Strict document on the W3 validation service. It came back valid so I can't see any issues in that area with adding it in as a fix.
<div class="resourcepdf">
<object data="test.pdf" type="application/pdf">
<param name="src" value="' . $fullurl . '" />Click to open <a href="test.pdf">PDF</a>
</object>
</div>
Edit: Forgot to actually mention which file I've made the change in...
Moodle/mod/resources/type/file/resource.class.php