SOLVED: 1.11.3 Smarty probleem (wit scherm) bij wijzigen

Nederlandse ondersteuning voor CMS Made Simple

Moderator: velden

Post Reply
eus
Forum Members
Forum Members
Posts: 40
Joined: Fri Jan 16, 2009 12:56 pm

SOLVED: 1.11.3 Smarty probleem (wit scherm) bij wijzigen

Post by eus »

Hoi,

Blank pages problem, easy to reproduce. Never had this problem before.


Html block named "begin":

Code: Select all

<!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" xml:lang="en" lang="en">
  <head>
{assign var="pretty" value="/"|explode:$smarty.get.page}
{if isset($canonical)}<link rel="canonical" href="{$canonical}" />{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}" />{/if}
<title>{title} | {sitename}</title>
{metadata}
{cms_stylesheet}
  </head>

Template
-----------
{global_content name='begin'}
</__body>
{$pretty[0]}
{content}
<__body>
</__html>
----------
Save gives white screen !!!

/tmp/cache/debug.log gives ...

ERROR DETECTED: Cannot use object of type CMSMS_Dummy_Variable_Value as array at /var/www/vhosts/q-wash.nl/httpdocs/preview/tmp/templates_c/parser1353596484^dd10a1840f43813cd647195dd79bd3add047c6e9.template.appdata;tmp_template.php:30

You can't save the brackets [ ] !

{$pretty|print_r} gives the correct values so it's only a bug in edittemplate.php i guess.

You can save html block with variables like $pretty[1]

Thnx
Last edited by eus on Thu Nov 22, 2012 4:16 pm, edited 3 times in total.
Jos
Support Guru
Support Guru
Posts: 4020
Joined: Wed Sep 05, 2007 8:03 pm

Re: 1.11.3 Smarty probleem (wit scherm) bij wijzigen Sjabloo

Post by Jos »

thx... this is an already known issue. It's related to the use of arrays in templates. Stikki is working on it
deactivated010521

Re: 1.11.3 Smarty probleem (wit scherm) bij wijzigen Sjabloo

Post by deactivated010521 »

----------
Last edited by deactivated010521 on Tue Mar 12, 2013 3:02 pm, edited 1 time in total.
eus
Forum Members
Forum Members
Posts: 40
Joined: Fri Jan 16, 2009 12:56 pm

Re: 1.11.3 Smarty probleem (wit scherm) bij wijzigen Sjabloo

Post by eus »

arnoud wrote:Wat doet glow?

Code: Select all

[glow]{assign var="pretty" value="/"|explode:$smarty.get.page}[/glow]
glow hoort er niet bij maar was bedoelt om de smarty assign te accentueren. Dat werkt blijkbaar niet in dit forum. Het glow knopje in de editor van dit forum. ik heb het verwijderd in de orginele post nu.
Stikki

Re: 1.11.3 Smarty probleem (wit scherm) bij wijzigen Sjabloo

Post by Stikki »

Hello folks!

Many thanks to Jos reporting this at the first place.

Fixed in SVN.

Problem was that dummy object wasn't callable as ArrayObject, now it is.

Copy & overwrite:

lib/classes/class.Smarty_parser.php

Or:

Wait for fix release.

I am really sorry, this whole thing lacked some testing, etc...

-Stikki-
eus
Forum Members
Forum Members
Posts: 40
Joined: Fri Jan 16, 2009 12:56 pm

Re: 1.11.3 Smarty probleem (wit scherm) bij wijzigen Sjabloo

Post by eus »

Jos wrote:thx... this is an already known issue. It's related to the use of arrays in templates. Stikki is working on it
Thnx for the quick response
eus
Forum Members
Forum Members
Posts: 40
Joined: Fri Jan 16, 2009 12:56 pm

Re: 1.11.3 Smarty probleem (wit scherm) bij wijzigen Sjabloo

Post by eus »

Stikki wrote:Hello folks!

Many thanks to Jos reporting this at the first place.

Fixed in SVN.

Problem was that dummy object wasn't callable as ArrayObject, now it is.

Copy & overwrite:

lib/classes/class.Smarty_parser.php

Or:

Wait for fix release.

I am really sorry, this whole thing lacked some testing, etc...

-Stikki-
Yep, that worked !! Thnx
Post Reply

Return to “Dutch - Nederlands”