Share » Forums » Setup & design » Attribute filter (in template) -...

Attribute filter (in template) - parse error

Attribute filter (in template) - parse error

Wednesday 28 September 2005 4:18:29 am - 5 replies

Author Message

Marko Žmak

Wednesday 28 September 2005 3:43:14 pm

Could you paste here some of your offending code, so that someone can test it?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marin Orlic

Thursday 29 September 2005 6:36:57 am

I will. I'm trying to figure out what could be the cause of the error.

Marin Orlic

Thursday 29 September 2005 2:24:43 pm

Ok for instance this doesn't work..

{let users=fetch( content, list, hash( parent_node_id, 230, 
                                       class_filter_type, include,
                                       class_filter_array, array ( 38 ),
                                       attribute_filter, array ( and, array ( 294, '=', '1' ) ) ) ) )}

Gives

Empty variable name at [( content, list, hash( parent_node_id, 230, 
                                       class_filter_type, include,
                                       class_filter_array, array ( 38 ),
                                       attribute_filter, array ( and, array ( 294, '=', '1' ) ) ) ) )]

Marko Žmak

Thursday 29 September 2005 2:51:23 pm

I think you have one right bracket too much. Try removing it and see what happens.

P.S. A tip: aligning your right brackets with their left bracket pair can be really useful. Like this for example:

{let users=fetch( content, list, hash( parent_node_id, 230, 
                                       class_filter_type, include,
                                       class_filter_array, array ( 38 ),
                                       attribute_filter, array ( and, array ( 294, '=', '1' ) )
                                     )
                )
}

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Leif Arne Storset

Sunday 11 May 2008 3:46:37 pm

I don't know if helped Orlic, but I found Zmak's advice to apply to my situation. Two missing right parens gave caused an "Empty variable name" error for me. I don't quite understand why, even after staring at the relevant PHP code for a while.

Leif Arne Storset

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

36 542 Users on board!

Forums menu