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

Smarty 3 gives me lots of errors

 
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 -> Smarty 3
View previous topic :: View next topic  
Author Message
drak
Smarty Rookie


Joined: 25 Nov 2009
Posts: 11

PostPosted: Wed Nov 25, 2009 6:45 am    Post subject: Smarty 3 gives me lots of errors Reply with quote

I've been trying to test Smarty 3 with our framework and I am getting lots of errors, with many suspicious looking filenames and use of full path and not. I have listed one of each error (which appear dozens of times).

I have XDebug loaded into PHP which tends reveal more errors than without.

I don't know if there is something we need to change or it's because Smarty 3 still has some bugs.

Code:

Notice: Trying to get property of non-object in C:\xampp\htdocs\core\trunk\lib\vendor\Smarty3\sysplugins\smarty_internal_templatebase.php on line 218

Warning: rename(C:\xampp\htdocs\core\trunk\ZTemp\Renderer_compiled\wrtFEA.tmp,ZTemp/Renderer_compiled\|andreas08|en^409031215.z.users_block_login.htm.php) [function.rename]: No such file or directory in C:\xampp\htdocs\core\trunk\lib\vendor\Smarty3\sysplugins\smarty_internal_write_file.php on line 41

Warning: chmod() [function.chmod]: No such file or directory in C:\xampp\htdocs\core\trunk\lib\vendor\Smarty3\sysplugins\smarty_internal_write_file.php on line 43

Warning: include(ZTemp/Renderer_compiled\|andreas08|en^1368088540.z.users_block_online.htm.php) [function.include]: failed to open stream: Invalid argument in C:\xampp\htdocs\core\trunk\lib\vendor\Smarty3\sysplugins\smarty_internal_template.php on line 435

Warning: include() [function.include]: Failed opening 'ZTemp/Renderer_compiled\|andreas08|en^1368088540.z.users_block_online.htm.php' for inclusion (include_path='.;C:\xampp\php\PEAR;C:\xampp\htdocs\core\trunk\lib\vendor\;C:\xampp\htdocs\core\trunk\lib\vendor/dwoo\') in C:\xampp\htdocs\core\trunk\lib\vendor\Smarty3\sysplugins\smarty_internal_template.php on line 435


I love some help here so we can give Smarty a real good test.

Drak
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Nov 25, 2009 8:38 pm    Post subject: Reply with quote

How does your call of the display methode look like?

Could be wrong parameter ordering if you are using cache_id and or compile_it...
Back to top
View user's profile Send private message
Matheo
Smarty n00b


Joined: 26 Nov 2009
Posts: 2

PostPosted: Thu Nov 26, 2009 5:53 am    Post subject: Our source Reply with quote

Hi Tews!
Our source looks like:
Code:
$pnr = Renderer::getInstance('Users');
if ($pnr->is_cached('users_block_login.htm')) {
    $row['content'] = $pnr->fetch('users_block_login.htm');
    return pnBlockThemeBlock($row);
}
$pnr->assign(...);
... $pnr->fetch('users_block_login.htm');


and the template is simple:
Code:
{pnmodgetvar module='Users' name='loginviaoption' assign='loginviaoption'}

<form action="{pnmodurl modname="Users" type="user" func="login"}" method="post">
    <div style="text-align:left">
        {if $loginviaoption eq 0}
        <div><label for="loginblock_username">{gt text="User name" domain='zikula'}</label></div>
        <div><input id="loginblock_username" type="text" name="uname" size="14" maxlength="25" value="{gt text="User name" domain='zikula'}" onblur="if(this.value=='')this.value='{gt text="User name" domain='zikula'}';" onfocus="if(this.value=='{gt text="User name" domain='zikula'}')this.value='';" /></div>
        {else}
        <div><label for="loginblock_email">{gt text="E-mail address" domain='zikula'}</label></div>
        <div><input id="loginblock_email" type="text" name="email" size="14" maxlength="64" /></div>
        {/if}
        <div><label for="loginblock_password">{gt text="Password" domain='zikula'}</label></div>
        <div><input id="loginblock_password" type="password" name="pass" size="14" maxlength="20" /></div>
        {if $seclevel neq 'High'}
        <input id="loginblock_rememberme" type="checkbox" value="1" name="rememberme" />
        <label for="loginblock_rememberme">{gt text="Remember me" domain='zikula'}</label>
        {/if}
        <input type="hidden" name="url" value="{$returnurl|pnvarprepfordisplay}" />
        <input type="hidden" name="authid" value="{insert name="generateauthkey" module="Users"}" />
        <div><input type="submit" value="{gt text="Log in" domain='zikula'}" /></div>
        {if $allowregistration}
        <ul>
            <li><a href="{pnmodurl modname=Users func=register}">{gt text="New account" domain='zikula'}</a></li>
            <li><a href="{pnmodurl modname=Users func=lostpassword}">{gt text="Lost password" domain='zikula'}</a></li>
        </ul>
        {/if}
    </div>
</form>


To me THE BIG ISSUE looks like the compiled template generated at C:\xampp\htdocs\core\trunk\ZTemp\Renderer_compiled\wrtFEA.tmp is not there when Smarty attempts to rename it...
Back to top
View user's profile Send private message
drak
Smarty Rookie


Joined: 25 Nov 2009
Posts: 11

PostPosted: Thu Nov 26, 2009 11:27 am    Post subject: Reply with quote

Yes, I logged that here... http://code.google.com/p/smarty-php/issues/detail?id=18
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 -> Smarty 3 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