Share » Forums » Setup & design » Where does this 'B' come from in my...

Where does this 'B' come from in my template after upgrade to 3.2

Where does this 'B' come from in my template after upgrade to 3.2

Wednesday 24 September 2003 9:45:04 am - 6 replies

Modified on Thursday 25 September 2003 11:32:54 pm by Tonny Laursen

Author Message

Tonny Laursen

Thursday 25 September 2003 11:32:20 pm

In debug output I get the following, can this help to locate the problem?

Warning: eZTemplate:gt Sep 26 2003 08:25:39
Unsupported type: boolean( ), must be either array, attribute object or numerical
Error: eZTemplate Sep 26 2003 08:25:39
Cannot retrieve attribute of a boolean
Error: eZTemplate Sep 26 2003 08:25:39
Cannot retrieve attribute of a boolean
Error: eZTemplate Sep 26 2003 08:25:39
Cannot retrieve attribute of a boolean

Tonny Laursen

Tuesday 07 October 2003 1:27:44 am

In my override template i have the following:

{attribute_view_gui attribute=$content_version.data_map.file}<br>
{attribute_view_gui attribute=$content_version.data_map.file2}<br>
{attribute_view_gui attribute=$content_version.data_map.file3} <br>

Tonny Laursen

Monday 13 October 2003 11:53:39 pm

Now I'm trying again to locate the "B" but I cannot find it. Could someone please give me a hint?

Alex Jones

Tuesday 14 October 2003 6:38:08 am

Tonny, try removing or changing the value of |si(byte). It may be that it is tacking on the 'B' when the filesize attribute doesn't apply (as there isn't a file). If this ends up being the case you may want to write a section show statement to ensure the attribute is only displayed for entries that have a file associated with them.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Tonny Laursen

Wednesday 15 October 2003 12:16:32 am

Correct it was the |si(byte). Now I have tried with the following:
{1025|si(byte)}
{1025|si(byte,binary)}
{1025|si(byte,decimal)}
{1025|si(byte,none)}
{1025|si(byte,auto)}
{1025|si(byte,mebi)}

But all of them give the same result. Now I have removed the feature, that shows what size the file have.
It will be nice if someone could describe a solution?

Thanks,

Tonny

Tore Skobba

Friday 28 November 2003 7:06:48 am

Hi

Had the same problem.. Here is my "solution":

{section show=$node.data_map.attachment.content}
{attribute_view_gui attribute=$node.data_map.attachment}
{/section}

Where attachment is the file attribute. Is it ok to simply do a section show without any checks on the actual content? Tried to use the is_empty but that did not work? And this version checking on file name:

{section show=ne($node.data_map.attachment.content.filename,"")}

gave an debug error message, cannot retrive an boolean, for objects not having an binary file.

Cheers Tore

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu