Categories > TinyButStrong general >

TinyButStrong Error (Object or Array value expected)

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: RwD
Date: 2005-10-03
Time: 09:27

TinyButStrong Error (Object or Array value expected)

I can't really understand why I am getting the following error:
TinyButStrong Error (Object or Array value expected): Can't merge [var.settings.stylesheet.value] because the item before 'stylesheet' is neither an object nor an array. Its type is string. This message can be cancelled using parameter 'noerr'.
The settings.stylesheet.value exists, as tbs also indicates it is a string. The two lines this happens for in the template are these:
<link rel="stylesheet" href="[var.dir.css;noerr][var.settings.stylesheet.value]" type="text/css">
<link rel="stylesheet" href="[var.dir.css;noerr][var.settings.stylesheet_print.value]" type="text/css" media="print">
Now, the weirdest thing is that although I am using an IIS6 server I have been developing at IIS4/5 or whatever comes with win2000 and everything *was* fine untill I reinstalled IIS and it gave me this message. I later on installed apache 2.0.54 which is my current local server and it also gives me the error where the EXACT SAME code doesn't give that problem on the live server (I copied it from the IIS6 live server).

If this was just a question of a weird message but everything working I would use noerr...   ...but it ain't working either.

Other similar pieces of code do not give the same error:
[onload;file=[var.tmpl.breadcrumb]]
[onload;file=[var.tmpl.menu]]
[onload;file=[var.tmpl.section.main]]
[onload;file=[var.tmpl.section.side]]
The only difference between the code that goes wrong and the code that goes right is that the tmpl variable is an array where the settings variable is an object.
By: RwD
Date: 2005-10-03
Time: 09:33

Re: TinyButStrong Error (Object or Array value expected)

ooops, I screwed up in the post above;

screwup 1: I altered the code, the actual codes are:
TinyButStrong Error (Object or Array value expected): Can't merge [var.zettings.settings.stylesheet.value] because the item before 'stylesheet' is neither an object nor an array. Its type is string. This message can be cancelled using parameter 'noerr'.

and
<link rel="stylesheet" href="[var.dir.css;noerr][var.zettings.settings.stylesheet.value]" type="text/css">
<link rel="stylesheet" href="[var.dir.css;noerr][var.zettings.settings.stylesheet_print.value]" type="text/css" media="print">

Screwup 2: I misinterpreted the message; it is saying that the zettings variable is not an object where in fact it is; I can print_r it and get a result clearly stating zettings is of the type cSettings...

((I am using an object named "zettings" instead of "settings" because I had to use an alternative to settings at the moment of development...))
By: RwD
Date: 2005-10-03
Time: 09:37

Re: TinyButStrong Error (Object or Array value expected)

I tried outputting $zettings: >>[var.zettings]<<
output: >>Object<<
By: RwD
Date: 2005-10-05
Time: 11:07

Re: TinyButStrong Error (Object or Array value expected)

The problem disappeared after upgrading from 2.0.2.1 to 2.0.5
By: Skrol29
Date: 2005-10-05
Time: 11:21

Re: TinyButStrong Error (Object or Array value expected)

This is misterious.
But solved.
By: RwD
Date: 2005-10-06
Time: 14:39

Re: TinyButStrong Error (Object or Array value expected)

Yes, I was looking through the changelogs and it didn't really give me any idea what exactly changed to make the problem disappear. That was also why it took me this long to use the newest version... (I thought it wouldn't make a difference)