• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI and Quirks Mode


I'm having a really awkward problem with any view/section other than the MAIN INDEX going into quirks mode. I've done a few tests and one in particular gave me results to where I have no idea what to check anymore.

I basically stripped my main/main_index view down to this:
<p>Main Index View</p>

I then stripped my about/about_index view to something similar:
<p>About Index View</p>

Both of these views use the same "header/footer" view named application:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html lang="en"&gt;

  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;

  &lt;!-- CSS --&gt;
  &lt;link rel="stylesheet" type="text/css" media="screen, projection" href="system/application/assets/includes/css/main.css" /&gt;
  &lt;!-- End CSS --&gt;

&lt;?php echo $content; ?&gt;


My folder structure is set up as follows:
|_ controllers
   |_ main.php
   |_ about.php
|_ views
   |_ main
      |_ main_index.php
      |_ main_login.php
   |_ about
      |_ about_index.php
      |_ about_resume.php

My config.php file is set up to load the main controller by default which loads the main_index.php view by default..

For an example of how my controllers are set up:
class Main extends Controller {  

  function index() {
    $viewData['example_variable'] = "blah";

    // Load the main_index view
    $data['content'] = $this->load->view('main/main_index', $viewData, true);

    // Set some page variables
    $data['page_title'] = "Home Page, Son!";

    // Load the header / footer..
    $this->load->view('application', $data);



And now for some weird reason, main_index is in standards compliant mode, but about_index is in quirks mode..

Any ideas?

Edit ::::
After more testing, it only seems to be happening in FireFox.. I have version 3.6.8


After more trial and error.. I've narrowed it down to the following line in my CONTROLLER..

// Get top 8 standings for the rounds
$season->weeks[$round_counter]->top8_players = $this->match_model->getTop8SeasonRoundStandings(array('season_id' => $season->id, 'season_round_id' => $round_counter));

Still looking for how this can cause quirks mode.. All the html in the view that is being output with this variable is correct.. The odd part is that there is another line directly above this one with the same concept except it gets top8_matches instead.. but it doesn't cause quirks mode..

More to come..

WTF is quirks mode???

@Developer13: http://www.cs.tut.fi/~jkorpela/quirks-mode.html

I found the issue.. I'm apparently an idiot and forgot quotations while using usort in one of my helpers and for some really weird reason it caused quirks mode in firefox..

[quote author="Developer13" date="1288385712"]WTF is quirks mode???[/quote]

When browser tries to guess what you tried to write, and skips doctype. Usually happens when you print something before doctype, ie files with BOM, or some error printed before, in all cases this means you have some unwanted text printed before doctype.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.