Issues

ZF-5846: Stylesheets are broken for Firefox 3 with application/xhtml+xml as Content-Type

Issue Type: Bug Created: 2009-02-20T00:12:50.000+0000 Last Updated: 2012-11-20T20:53:14.000+0000 Status: Closed Fix version(s): Reporter: Tim Dettrick (uqtdettr) Assignee: None Tags: - Zend_Dojo

Related issues: Attachments:

Description

Dojo_View_Helper_Dojo_Container inserts an improper comment tag when producing stylesheet imports:

h4. Code:

<pre class="highlight">
class My_Controller_Plugin_LayoutSelector
    extends Zend_Controller_Plugin_Abstract
{
    public function routeStartup(Zend_Controller_Request_Abstract $request)
    {
               if (strpos($accepts, 'application/xhtml+xml')) {
            $this->getResponse()->setHeader(
                'Content-Type', 
                'application/xhtml+xml; charset=UTF-8');
        } else {
            $this->getResponse()->setHeader(
                'Content-Type', 
                'text/html; charset=UTF-8');
        }
        }
}

in view script:

<pre class="highlight">
<?= $this->dojo()->enable()
    ->setDjConfigOption('parseOnLoad', true)
    ->addStyleSheetModule('dijit.themes.tundra');
?>

h4. Output:

<pre class="highlight">

This causes Firefox 3 to not process the CSS in the style: https://developer.mozilla.org/En/…

This issue is probably not limited to Firefox, and should affect Opera 7+ and Mozilla 1.0+.

This issue will not occur when using Content-Type of text/html, as Firefox does not check the document for validity as XML.

h4. Workaround: Manually import all stylesheets with link tags or correct @import statements.

h4. Required fix: Check returned Content-Type and remove comments if application/xhtml.

Comments

Posted by Rob Allen (rob) on 2012-11-20T20:53:14.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts