rsanchez / json

Output ExpressionEngine data in JSON format.
http://devot-ee.com/add-ons/json/
100 stars 236 forks source link

display_by="week" Support? #15

Closed grantmx closed 12 years ago

grantmx commented 12 years ago

Hey Rob - I'm getting this PHP error when I add the display_by="week" parameter.

Error Number: 1054

Unknown column 'yearweek' in 'order clause'

SELECT t.title, t.url_title, t.entry_id, t.channel_id, t.author_id, t.status, t.entry_date, t.edit_date, t.expiration_date, wd.field_id_1 AS related_ministry, wd.field_id_2 AS event_time, wd.field_id_17 AS links, wd.field_id_13 AS event_desc, wd.field_id_14 AS event_location FROM (exp_channel_titles t) JOIN exp_channel_data wd ON t.entry_id = wd.entry_id WHERE t.entry_id IN ('19') ORDER BY yearweek ASC, t.sticky desc, t.entry_date asc, t.entry_id asc

Filename: third_party/json/pi.json.php

Line Number: 135

Is this supported? Thanks!

rsanchez commented 12 years ago

If you use the same parameters on a plain old channel:entries tag, do you get the same error?

grantmx commented 12 years ago

Yep. display_by="week" is a valid parameter for the channel:entries tag: http://expressionengine.com/user_guide/modules/channel/channel_entries.html#display-by

rsanchez commented 12 years ago

You are right! I just updated w/ a fix.