Extension, Module

Archived
Forum
(read-only)


For official support, visit the official support site »

Webservice

ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4

Back to this add-on's main page
View Other Add-ons From Rein de Vries

     

The word ‘untitled’ in content breaks ouput

Bug (Resolved)

wuwongy
wuwongy

Hi Reinos,

We put a site live last year using this and it worked fine. We have an odd bug where we have found the word ‘untitled’ in the content being parsed breaks the output of the JSON. It seems as though maybe the code is looking for the word ‘title’ and ‘untitled’ is breaking it. Could you shed any light on this please?

Thanks

M

Reinos
# 1
Developer
Reinos

Hi M,

what is your request and your response (even when it breaks).

Let me know.
Best,
Rein

wuwongy
# 2
wuwongy

Hi Rein,

This is the request:

http://********************.com/index.php/api/rest/read_entry/json?auth[api_key]=***********************************&data;[channel]=cities&data;[output_fields]=title

and this is the response:

{“message”:“Successfully readed”,“success”:true,“id”:“90|85|83|84|82|81|80|28|99”,“metadata”:{“id”:“90|85|83|84|82|81|80|28|99”,“limit”:9999,“offset”:0,“total_results”:9,“absolute_results”:9},“data”:[{“title”:“Liverpool”,“entry_id”:“90”,“entry_date”:“1434710160”},{“title”:“London”,“entry_id”:“85”,“entry_date”:“1434545640”},{“title”:“Glasgow”,“entry_id”:“83”,“entry_date”:“1434545580”},{“title”:“Oxford”,“entry_id”:“84”,“entry_date”:“1434545580”},{“title”:“Leeds”,“entry_id”:“82”,“entry_date”:“1434545520”},{“title”:“Birmingham”,“entry_id”:“81”,“entry_date”:“1434545520”},{“title”:“Manchester”,“entry_id”:“80”,“entry_date”:“1434545460”},{“title”:“Derby”,“entry_id”:“28”,“entry_date”:“1430394000”},{“title”:“Dazzle Ship prints”,“entry_id”:“99”,“entry_date”:“1438700640”}]}

The last entry (99) is not from the Cities channel being requested but from another Events channel. Entry 99 has a grid field with a text field value of ‘untitled’. When this dosent contain the string ‘untitled’ the entry isn’t pulled into the above response. It looks like the output_fields=title call in the request is also picking up entries with the string ‘title’ somewhere in their grid content. Do you see the issue?

This is on version 4.3.1

Thanks
Marc

Reinos
# 3
Developer
Reinos

Sounds weird, and i do not get this issue. The output_fields does nothing with the entry, it jsut get the fields you needed.

Do you have a test link for me with FTP login.

http://reinos.nl/expressionengine/support

Best,
Rein

Reinos
# 4
Developer
Reinos

Problem solved; output_fields was triggering the matrix/grid search. It has nothing todo with the untitled entry value.

Will add this in the upcoming release.

Best,
Rein