Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Debug Console not popping up

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Rien
Smarty n00b


Joined: 11 Jun 2003
Posts: 1

PostPosted: Wed Jun 11, 2003 3:43 am    Post subject: Debug Console not popping up Reply with quote

I've done a quick search through the forums and I don't see this mentioned anywhere, so I figured I might as well mention it.

A while ago, I found out that I couldn't get the debug console to pop up even though I set $smarty->debugging = 'true'. After examining my code, I found out that if I assigned an url to a key of an array, the debug console would fail to pop up. An example would be as follows:

Code:

$smarty->assign('temp',array(
  'Key1' => 'Some random text',
  '<a href="blah.html">blah</a>' => 'Some random text',
));


I'm unsure of whether or not this is a feature, bug, or if I'm not suppposed to put URLs in the key of an array.
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jun 11, 2003 5:28 am    Post subject: Reply with quote

The debug console is itself the result of the debug.tpl template being automatically included from within your template. The template generates javascript code which contains all of the necessary debug info as well as the code to pop open the console window.

From what I can tell, the problem is the way the debug template tries to dynamically access template vars. As it turns out, the template still runs (and finishes) but the problem is that the resulting javascript contains errors so your browser can't execute it.

Probably not the best idea to set a value for the key that couldn't also be a legal PHP variable.
Back to top
View user's profile Send private message
NancyM
Smarty n00b


Joined: 05 Aug 2003
Posts: 1

PostPosted: Tue Aug 05, 2003 5:22 pm    Post subject: Reply with quote

I'm running into this too with 2.5.

Iexplorer complains about an unmatched " and I think it's this very, very long javascript line. Mabe it's just too long?

Code:
            _smarty_console.document.write("<tr bgcolor=#fafafa><td valign=top><
tt><font color=blue>{$ExternalLinks}</font></tt></td><td nowrap><tt><font color=
green><b>Array (2)</b><br>\r<b>Other San Diego Resources
</b> =& <b>Array (3)</b><br>\r&&<b>Quail Botanical Gardens</b> =>
; http://www.qbgardens.com/ <br>\r&&<b>Water Conservation Gardens</b>
=& http://209.216.250.185/garden/index.h...<br>\r&&<b>Submit a link
</b> =& /submitlink.php <br>\r<b>San Diego Garden Clubs and Plant Societies
</b> =& <b>Array (5)</b><br>\r&&<b>Rose Society</b> =& http://ww
w.sdrosesociety.org <br>\r&&<b>County Orchid Society</b> =& http://
www.sdorchids.com/ <br>\r&&<b>Iris Society</b> =& http://www.geocit
ies.com/RainForest/7...<br>\r&&<b>Cactus & Succulent Society</b> =&
 http://www.sdcss.com/ <br>\r&&<b>California Native Plant Society</b>
=& http://www.cnpssd.org/ </font></tt></td></tr>");
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP