#5699: Debug not XHTML compliant
----------------------------------+-----------------------------------------
    Reporter:  NiteFall           |          Type:  Bug    
      Status:  new                |      Priority:  Medium 
   Milestone:  1.2.x.x            |     Component:  General
     Version:  RC2                |      Severity:  Normal 
    Keywords:  Dropdowns IE Ajax  |   Php_version:  PHP 5  
Cake_version:  1.2.0.7692 RC3     |  
----------------------------------+-----------------------------------------
 after a normal bake session enabling debug in the config/core.php to level
 2:[[BR]]
 [[BR]]
        Configure::write('debug', 2);[[BR]]
 [[BR]]
 Afterward the dropdowns on the add.ctp failed to populate via $ajax call.
 When the rendered add.ctp source is viewed, the html is no longer XHTML
 compliant. [[BR]]
 It has this kind of structure:[[BR]]
 [[BR]]

 {{{
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
 <html xmlns="http://www.w3.org/1999/xhtml";>
 <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
 />   <title>
                 CakePHP: the rapid development php framework:
 Members </title>
         <link href="/pipeline/favicon.ico" type="image/x-icon"
 rel="icon"/><link href="/pipeline/favicon.ico" type="image/x-icon"
 rel="shortcut icon"/><link rel="stylesheet" type="text/css"
 href="/pipeline/css/cake.generic.css" /><script type="text/javascript"
 src="/pipeline/js/jquery.js"></script><script type="text/javascript">
  jQuery.noConflict();

 function run_addyGet(task, elm1, elm2)
 {
     var selected_text = jQuery('#'+elm1+' :selected').text();
     if (elm2)
         {
                 var previous_select_text = jQuery('#'+elm2+'
 :selected').text();
         }
     switch(task)
     {
         case 'city':
         // Get the value of the current 'State'
          jQuery.ajax({
                 type: "POST",
                 url: '/pipeline/members/getAddyDetails/'+selected_text,
                 cache: false,
                 success: function(rText){
                         alert(rText);
                         jQuery('#MemberCity').html(rText);
                         jQuery('#MemberCity').removeAttr("disabled");
                 }
         });
         break;

         case 'zip':
         // need to get zips and pass both state and city
         jQuery.ajax({
                 type: "POST",
                 url:
 '/pipeline/members/getAddyDetails/'+previous_select_text+'/'+
 selected_text,
                 success: function(reText){
                         //alert(reText);
                         jQuery('#MemberZipCode').html(reText);
                 }
         });
         break;
     }
 }
 </script>
 </head>
 <body>
         <div id="container">
                 <div id="header">
                         <h1><a href="http://cakephp.org";>CakePHP: the
 rapid development php framework</a></h1>
                 </div>
                 <div id="content">


                         <div class="members form">
 <form id="MemberAddForm" method="post"
 action="/pipeline/members/add"><fieldset style="display:none;"><input
 type="hidden" name="_method" value="POST" /><input type="hidden"
 name="data[_Token][key]" value="690193d395e138a8f32951016fae0e1f30f5e943"
 id="Token1452239408" /></fieldset>      <fieldset>
                 <legend>Add Member</legend>
         <div class="input text required"><label
 for="MemberEmail">Email</label><input name="data[Member][email]"
 type="text" maxlength="80" value="" id="MemberEmail" /></div><div
 class="input text required"><label
 for="MemberUsername">Username</label><input name="data[Member][username]"
 type="text" maxlength="16" value="" id="MemberUsername" /></div><div
 class="input text required"><label for="MemberFirstName">First
 Name</label><input name="data[Member][first_name]" type="text"
 maxlength="50" value="" id="MemberFirstName" /></div><div class="input
 text required"><label for="MemberLastName">Last Name</label><input
 name="data[Member][last_name]" type="text" maxlength="50" value=""
 id="MemberLastName" /></div><div class="input password required"><label
 for="MemberPassword">Password</label><input type="password"
 name="data[Member][password]" value="" id="MemberPassword" /></div><div
 class="input checkbox required"><input type="hidden"
 name="data[Member][opt_out_cpny_contact]" id="MemberOptOutCpnyContact_"
 value="0" /><input type="checkbox"
 name="data[Member][opt_out_cpny_contact]" value="1"
 id="MemberOptOutCpnyContact" /><label for="MemberOptOutCpnyContact">Opt
 Out Cpny Contact</label></div><div class="input checkbox required"><input
 type="hidden" name="data[Member][opt_out_third_party_contact]"
 id="MemberOptOutThirdPartyContact_" value="0" /><input type="checkbox"
 name="data[Member][opt_out_third_party_contact]" value="1"
 id="MemberOptOutThirdPartyContact" /><label
 for="MemberOptOutThirdPartyContact">Opt Out Third Party
 Contact</label></div><div class="input checkbox required"><input
 type="hidden" name="data[Member][term_of_service_agreement]"
 id="MemberTermOfServiceAgreement_" value="0" /><input type="checkbox"
 name="data[Member][term_of_service_agreement]" value="1"
 id="MemberTermOfServiceAgreement" /><label
 for="MemberTermOfServiceAgreement">Term Of Service
 Agreement</label></div><div class="input text required"><label
 for="MemberBirthPlace">Birth Place</label><input
 name="data[Member][birth_place]" type="text" maxlength="50" value=""
 id="MemberBirthPlace" /></div><div class="input select required"><label
 for="MemberEducationId">Education</label><select
 name="data[Member][education_id]" id="MemberEducationId">
 <option value="1">High School</option>
 <option value="2">Associates Degree</option>
 <option value="3">Bachelors</option>
 <option value="4">Masters</option>
 <option value="5">Doctorate</option>
 </select></div><div class="input select required"><label
 for="MemberGender">Gender</label><select name="data[Member][gender]"
 id="MemberGender">
 <option value="M">Male</option>
 <option value="F">Female</option>
 </select></div><div class="input text required"><label
 for="MemberHeight">Height</label><input name="data[Member][height]"
 type="text" maxlength="3" value="" id="MemberHeight" /></div><div
 class="input select"><label for="MemberState">State</label><select
 name="data[Member][state]" onchange="run_addyGet(&#039;city&#039;,
 this.id);" id="MemberState">
 <option value="">Select a State</option>
 <option value="New Hampshire">New Hampshire</option>
 <option value="New York">New York</option>
 <option value="Puerto Rico">Puerto Rico</option>
 <option value="Virgin Islands">Virgin Islands</option>
 <option value="Massachusetts">Massachusetts</option>
 </select></div><div class="input select"><label
 for="MemberCity">City</label><select name="data[Member][city]"
 disabled="disabled" onchange="run_addyGet(&#039;zip&#039;, this.id,
 &#039;MemberState&#039;);" id="MemberCity">
 <option value="">Select a City</option>
 </select></div><div class="input select required"><label
 for="MemberZipCode">Zip Code</label><select name="data[Member][zip_code]"
 disabled="disabled" id="MemberZipCode">
 <option value="">Select a Zip Code</option>
 </select></div><div class="input select required"><label
 for="MemberStatusId">Status</label><select name="data[Member][status_id]"
 id="MemberStatusId">
 <option value="1">Never Married</option>
 <option value="2">Widowed</option>
 <option value="3">Divorced</option>
 </select></div><div class="input select required"><label
 for="MemberProfessionId">Profession</label><select
 name="data[Member][profession_id]" id="MemberProfessionId">
 <option value="1">Accountant</option>
 <option value="2">Acrobat</option>
 <option value="3">Actor</option>
 <option value="4">Actuary</option>
 <option value="5">Administrative Worker</option>
 <option value="6">Administrator</option>
 <option value="7">Agent</option>
 </select></div><div class="input select required"><label
 for="MemberSpousesProfessionId">Spouses Profession</label><select
 name="data[Member][spouses_profession_id]" id="MemberSpousesProfessionId">
 <option value="1">Accountant</option>
 <option value="2">Acrobat</option>
 <option value="3">Actor</option>
 <option value="4">Actuary</option>
 <option value="5">Administrative Worker</option>
 <option value="6">Administrator</option>
 <option value="7">Agent</option>
 </select></div><div class="input checkbox required"><input type="hidden"
 name="data[Member][can_login]" id="MemberCanLogin_" value="0" /><input
 type="checkbox" name="data[Member][can_login]" value="1"
 id="MemberCanLogin" /><label for="MemberCanLogin">Can
 Login</label></div><div class="input checkbox required"><input
 type="hidden" name="data[Member][active]" id="MemberActive_" value="0"
 /><input type="checkbox" name="data[Member][active]" value="1"
 id="MemberActive" /><label for="MemberActive">Active</label></div><div
 class="input checkbox required"><input type="hidden"
 name="data[Member][admin]" id="MemberAdmin_" value="0" /><input
 type="checkbox" name="data[Member][admin]" value="1" id="MemberAdmin"
 /><label for="MemberAdmin">Admin</label></div>    </fieldset>
 <div class="submit"><input type="submit" value="Submit" /></div><fieldset
 style="display:none;"><input type="hidden" name="data[_Token][fields]"
 value="007055877b485a1a1b4522e4664924d6f1c9e7bc%3An%3A0%3A%7B%7D"
 id="TokenFields1419983773" /></fieldset></form></div>
 <div class="actions">
         <ul>
                 <li><a href="/pipeline/members">List Members</a></li>
                 <li><a href="/pipeline/educations">List Educations</a>
 </li>
                 <li><a href="/pipeline/educations/add">New Education</a>
 </li>
                 <li><a href="/pipeline/statuses">List Statuses</a> </li>
                 <li><a href="/pipeline/statuses/add">New Status</a> </li>
                 <li><a href="/pipeline/zip_codes">List Zip Codes</a> </li>
                 <li><a href="/pipeline/zip_codes/add">New Zip Code</a>
 </li>
                 <li><a href="/pipeline/professions">List Professions</a>
 </li>
                 <li><a href="/pipeline/professions/add">New Profession</a>
 </li>
                 <li><a href="/pipeline/progenies">List Progenies</a> </li>
                 <li><a href="/pipeline/progenies/add">New Progeny</a>
 </li>
         </ul>
 </div>

                 </div>
                 <div id="footer">
                         <a href="http://www.cakephp.org/";
 target="_blank"><img src="/pipeline/img/cake.power.gif" alt="CakePHP: the
 rapid development php framework" border="0" /></a>          </div>
         </div>
         </body>
 </html>
 <!-- 2.254s --><table class="cake-sql-log"
 id="cakeSqlLog_1225751621490f7c45ebdcc8_60722395" summary="Cake SQL Log"
 cellspacing="0" border = "0">
 <caption>(default) 21 queries took 30 ms</caption>
 <thead>
 <tr><th>Nr</th><th>Query</th><th>Error</th><th>Affected</th><th>Num.
 rows</th><th>Took (ms)</th></tr>
 </thead>
 <tbody>
 <tr><td>1</td><td>DESCRIBE `members`</td><td></td><td style = "text-align:
 right">20</td><td style = "text-align: right">20</td><td style = "text-
 align: right">1</td></tr>
 <tr><td>2</td><td>DESCRIBE `educations`</td><td></td><td style = "text-
 align: right">2</td><td style = "text-align: right">2</td><td style =
 "text-align: right">1</td></tr>
 <tr><td>3</td><td>DESCRIBE `progenies`</td><td></td><td style = "text-
 align: right">24</td><td style = "text-align: right">24</td><td style =
 "text-align: right">2</td></tr>
 <tr><td>4</td><td>DESCRIBE `faiths`</td><td></td><td style = "text-align:
 right">2</td><td style = "text-align: right">2</td><td style = "text-
 align: right">1</td></tr>
 <tr><td>5</td><td>DESCRIBE `seekings`</td><td></td><td style = "text-
 align: right">17</td><td style = "text-align: right">17</td><td style =
 "text-align: right">1</td></tr>
 <tr><td>6</td><td>DESCRIBE `professions`</td><td></td><td style = "text-
 align: right">2</td><td style = "text-align: right">2</td><td style =
 "text-align: right">1</td></tr>
 <tr><td>7</td><td>DESCRIBE `ethnicities`</td><td></td><td style = "text-
 align: right">2</td><td style = "text-align: right">2</td><td style =
 "text-align: right">1</td></tr>
 <tr><td>8</td><td>DESCRIBE `habits`</td><td></td><td style = "text-align:
 right">2</td><td style = "text-align: right">2</td><td style = "text-
 align: right">1</td></tr>
 <tr><td>9</td><td>DESCRIBE `colors`</td><td></td><td style = "text-align:
 right">2</td><td style = "text-align: right">2</td><td style = "text-
 align: right">1</td></tr>
 <tr><td>10</td><td>DESCRIBE `progenies_seekings`</td><td></td><td style =
 "text-align: right">3</td><td style = "text-align: right">3</td><td style
 = "text-align: right">1</td></tr>
 <tr><td>11</td><td>DESCRIBE `statuses`</td><td></td><td style = "text-
 align: right">2</td><td style = "text-align: right">2</td><td style =
 "text-align: right">1</td></tr>
 <tr><td>12</td><td>DESCRIBE `zip_codes`</td><td></td><td style = "text-
 align: right">3</td><td style = "text-align: right">3</td><td style =
 "text-align: right">1</td></tr>
 <tr><td>13</td><td>DESCRIBE `images`</td><td></td><td style = "text-align:
 right">3</td><td style = "text-align: right">3</td><td style = "text-
 align: right">1</td></tr>
 <tr><td>14</td><td>DESCRIBE `progenies_images`</td><td></td><td style =
 "text-align: right">3</td><td style = "text-align: right">3</td><td style
 = "text-align: right">1</td></tr>
 <tr><td>15</td><td>DESCRIBE `interests`</td><td></td><td style = "text-
 align: right">2</td><td style = "text-align: right">2</td><td style =
 "text-align: right">1</td></tr>
 <tr><td>16</td><td>DESCRIBE `progenies_interests`</td><td></td><td style =
 "text-align: right">3</td><td style = "text-align: right">3</td><td style
 = "text-align: right">1</td></tr>
 <tr><td>17</td><td>SELECT `Education`.`id`, `Education`.`title` FROM
 `educations` AS `Education`   WHERE 1 = 1   </td><td></td><td style =
 "text-align: right">5</td><td style = "text-align: right">5</td><td style
 = "text-align: right">0</td></tr>
 <tr><td>18</td><td>SELECT `Status`.`id`, `Status`.`status` FROM `statuses`
 AS `Status`   WHERE 1 = 1   </td><td></td><td style = "text-align:
 right">3</td><td style = "text-align: right">3</td><td style = "text-
 align: right">0</td></tr>
 <tr><td>19</td><td>SELECT `ZipCode`.`state` FROM `zip_codes` AS `ZipCode`
 WHERE 1 = 1   </td><td></td><td style = "text-align: right">42192</td><td
 style = "text-align: right">42192</td><td style = "text-align:
 right">13</td></tr>
 <tr><td>20</td><td>SELECT `Profession`.`id`, `Profession`.`title` FROM
 `professions` AS `Profession`   WHERE 1 = 1   </td><td></td><td style =
 "text-align: right">470</td><td style = "text-align: right">470</td><td
 style = "text-align: right">0</td></tr>
 <tr><td>21</td><td>SELECT `Profession`.`id`, `Profession`.`title` FROM
 `professions` AS `Profession`   WHERE 1 = 1   </td><td></td><td style =
 "text-align: right">470</td><td style = "text-align: right">470</td><td
 style = "text-align: right">0</td></tr>
 </tbody></table>
 }}}
 [[BR]]
 Note: the debug table comes after the final </html> tag. This was a very
 annoying bug as the dropdowns only update correctly in IE when debug is
 turned off.[[BR]]
 [[BR]]
 Can someone add a custom tag to the default layout which would add the
 debug table just before the </body> tag ? [[BR]]
 Perhaps there could be added a separate footer document from the default
 layout which begins with the debug information. [[BR]]

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5699>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to