Share » Forums » General » Strange fetch error in EZ 4

Strange fetch error in EZ 4

Strange fetch error in EZ 4

Friday 07 March 2008 1:34:22 am - 2 replies

Author Message

H. K.

Thursday 13 March 2008 9:12:40 am

Since there have been no inputs, the error has been reported as a bug.

Hans Melis

Thursday 13 March 2008 10:24:15 am

You are using 'class_filter_array', but you haven't specified 'class_filter_type'. Without the type of class filtering, the filter array won't be used at all. The possible values for the type are 'include' and 'exclude'.

Use 'include' to restrict the fetch to objects of the content classes specified in the filter array. Use 'exclude' to fetch all objects except those of the content classes specified in the filter array.

So basically, all you do now is fetching the most recently published node instead of the most recently published video.

And do you have any special reason to use a foreach? It's not wrong of course, but you are limiting the fetch to 1 result so it's a bit of a waste to loop. You can also access the first element of an array by using an index, e.g. $video1[0].

Hans
http://blog.hansmelis.be

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

36 542 Users on board!

Forums menu