Re: [SMARTY] Plugin problem

[email protected] (boots) Fri, 3 Nov 2006 12:39:37 -0800 (PST)
Newsgroups php.smarty.general
Message-ID <[email protected]>
Without knowing anything about your environment, my first thought on this is to guess that you are probably using sessions and serializing the Smarty object. If so, then don't. The Smarty object should never be serialized because it contains environment specific state information that may not be true once it is unserialized.

xo boots

"Erich C. Beyrent" <[email protected]> wrote: I did not go through all the plugins, but three failed, so I will 
venture to guess that yes, they all fail on page refresh.  I have 
caching disabled.

If I enable caching and specify a cache id, it works fine.  I am not 
sure this is a good thing though, especially where I am working with 
dynamically generated date forms.

Monte Ohrt wrote:
> Seems that something is amiss in your environment... do all the 
> plugins fail after the first page load? Are you using any Smarty caching?
>
> Erich C. Beyrent wrote:
>> Yes - I just saw the same behavior with the {debug} function.
>>
>> Monte Ohrt wrote:
>>> The important part is that the file name and function name are 
>>> correct, and they appear to be. You mentioned html_select_date has 
>>> the same problem. Do any other plugins exhibit this behavior?
>>>
>>> Erich C. Beyrent wrote:
>>>> Before I get into specifics, I should point out that I tested this 
>>>> problem using the standard html_select_date plugin, and saw the 
>>>> exact same behavior, so I don't think the problem is my plugin 
>>>> itself.  I believe there is some kind of issue with my environment.
>>>>
>>>> I have a single plugin directory, which is the main 
>>>> {smarty_dir}/libs/plugins directory.
>>>> The name of the plugin file is function.html_select_date2.php, 
>>>> which is based upon the original html_select_date function.  My 
>>>> modded file allows me to override the names of the fields like this:
>>>>
>>>> {html_select_date2 field_name="FromMonth,FromDay,FromYear" 
>>>> day_extra="id=FromDay class=dateSelect" month_extra="id=FromMonth 
>>>> class=dateSelect" year_extra="id=FromYear class=dateSelect" 
>>>> end_year="+2"}
>>>>
>>>> The contents are as follows (this is gonna be long...):
>>>>
>>>> function smarty_function_html_select_date2($params, &$smarty)
>>>> {
>>>> /* vim: set expandtab: */
>>>>
>>>> ?>
>>>
>>
>

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



 
---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited Try it today.