rsanchez / json

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

Pull entries without entry_id #4

Closed EpicVoyage closed 13 years ago

EpicVoyage commented 13 years ago

When you try to pull a custom field but don't request the entryid, the entries[field_type] handler still requires an entry_id. This breaks the functionality of the JSON plugin.

I don't see a way to attach a patch to this issue, so this is my recommended modification:

if (!in_array('t.entry_id', $select)) { $select[] = 't.entry_id'; }

Right before "$this->EE->db->select(implode(', ', $select), FALSE)..." (should be around line 102).

Apart from this, great plugin and a headache-saver when dealing with EE tags. Thanks!

rsanchez commented 13 years ago

patched in the latest