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

Expanded error message ?

 
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
gordonisnz
Smarty Regular


Joined: 05 Sep 2009
Posts: 70

PostPosted: Sun Aug 09, 2020 2:45 am    Post subject: Expanded error message ? Reply with quote

Undefined index: 0101100 in /PATHNAME/templates/compiled/68cb1c96d8e0655607f8fd82211be4678e7fa819_0.file.cultural.tpl.php on line 47

Hello. Is there a way we can get an expanded error message _ (even if improved in future versions of smarty).

What i'll like is a copy of the line - that is causing the error (eg a foreach loop etc)

I dont often go into the COMPILED directory - but i do know the line-number that is causing the problem in the COMPILED file does not necessarily reflect the same line number on the source file/template.


I dont have an undefined index of " 0101100" in my source data, or my template...

Knowing what the line looks like will narrow my search for the error.
Back to top
View user's profile Send private message
gordonisnz
Smarty Regular


Joined: 05 Sep 2009
Posts: 70

PostPosted: Sun Aug 09, 2020 2:58 am    Post subject: Reply with quote

Ive narrowed down my error.

Its an undefined index of $first

Code:

{foreach from=$cultural key=k item=v}
<option value='{$k}' {if $first==$k}selected="selected"{/if}>({$v.AGET}) {$v.NAME}</option>
{/foreach}


basically, I'm comparing an existing entry & automatically selecting it if the user previously submitted it.

HOWEVER - the error message occurs when i havnt selected anything (it will default to the first SELECT/OPTION entry.

BUT why would it cause an error - if it doesnt match, then it wont get selected ? why an undefined entry ?
Back to top
View user's profile Send private message
gordonisnz
Smarty Regular


Joined: 05 Sep 2009
Posts: 70

PostPosted: Sun Aug 09, 2020 3:36 am    Post subject: Reply with quote

Fixed / found my error.. (it was actually in the HEAD section of the template, Not the main part of the visible html output)...
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