I've got a List control that pulls from a PostGRES table set up on a live server and a test server.
On the Test server, when you search once, it shows results. When you try a new term in the same searchbox, it returns a 500 error, and the logging on the server has a long series of these:
"Thu Mar 09 13:25:48 2017
Thread: t0
Request URI: /helpdesk/maintenanceTicketMain.a5wcmp?__virtualPage=__a5RunDialog.a5w&__pageName=/helpdesk/hdmaint.a5w&__dialogFilename=maintenanceTicketMain&__alias=MAINTENANCETICK&__unsaved=no
Script: /helpdesk/__a5RunDialog.a5w
Line: 179
x_out = a5_ajax_dialog2(tmpl)
Script:json_parse() line:97
Exception has been thrown by the target of an invocation.
Invalid object passed in, ':' or '}' expected. (350): { "__dummyproperty" : [{name: 'TYPELIST', state: {page: 1, recordCount: 11, recordCountFormatted: '11', lastBreakValue: '<None>', pageCount: 1, pageSize: 20, paginated: false, _optimizedJSON: true, filter: '(Lower(type) LIKE Lower(:SEARCH_type_type1))', having: '', order: 'type', filterParameters: '0x1.ba4042p+835pn|||C|search_type_type1\n', highlight: {LOWER(TYPE): ['apn']}, whereClause: 'categoryID = :categoryID AND ( Lower(type) LIKE Lower(:SEARCH_type_type1) )', whereParameters: '127|||N|categoryid\n0|||N|typeid\n0x0.000002p-1022pn|||C|search_type_type1\n'}}, {name: 'ITEMLIST', state: {page: 1, recordCount: 0, recordCountFormatted: '0', lastBreakValue: '<None>', pageCount: 0, pageSize: 20, paginated: false, _optimizedJSON: true, filter: '', having: '', order: 'item', filterParameters: '', highlight: {}, whereClause: 'typeID = :typeID', whereParameters: '0|||N|ca
Execution Stack:
0#179 x_out = a5_ajax_dialog2(tmpl)"
When I inspect the POST requests that return the 500 response, on both Live and Test, the only difference I see is in the ''_state.listsControls' parameter, where Test has a 'highlights' property, and Live does not:
Live:
[
{
name: 'TYPELIST',
state: {
page: 1,
recordCount: 11,
recordCountFormatted: '11',
lastBreakValue: '',
pageCount: 1,
pageSize: 20,
paginated: false,
_optimizedJSON: true,
filter: '(Lower(type) LIKE Lower(: SEARCH_type_type1))',
having: '',
order: 'type',
filterParameters: '%apn%|||C|search_type_type1\n',
whereClause: 'categoryID = : categoryID AND ( Lower(type) LIKE Lower(: SEARCH_type_type1) )',
whereParameters: '127|||N|categoryid\n0|||N|typeid\n%apn%|||C|search_type_type1\n'
}
},
{
name: 'ITEMLIST',
state: {
page: 1,
recordCount: 0,
recordCountFormatted: '0',
lastBreakValue: '',
pageCount: 0,
pageSize: 20,
paginated: false,
_optimizedJSON: true,
filter: '',
having: '',
order: 'item',
filterParameters: '',
whereClause: 'typeID = : typeID',
whereParameters: '0|||N|categoryid\n0|||N|typeid\n'
}
}
]
Test:
[
{
name: 'TYPELIST',
state: {
page: 1,
recordCount: 4,
recordCountFormatted: '4',
lastBreakValue: '',
pageCount: 1,
pageSize: 20,
paginated: false,
_optimizedJSON: true,
filter: '(Lower(type) LIKE Lower(: SEARCH_type_type1))',
having: '',
order: 'type',
filterParameters: '%building%|||C|search_type_type1\n',
highlight: {
LOWER(TYPE): [
'building'
]
},
whereClause: 'categoryID = : categoryID AND ( Lower(type) LIKE Lower(: SEARCH_type_type1) )',
whereParameters: '127|||N|categoryid\n0|||N|typeid\n%building%|||C|search_type_type1\n'
}
},
{
name: 'ITEMLIST',
state: {
page: 1,
recordCount: 0,
recordCountFormatted: '0',
lastBreakValue: '',
pageCount: 0,
pageSize: 20,
paginated: false,
_optimizedJSON: true,
filter: '',
having: '',
order: 'item',
filterParameters: '',
highlight: {
},
whereClause: 'typeID = : typeID',
whereParameters: '0|||N|categoryid\n0|||N|typeid\n'
}
}
]
Now I'm not sure where this "highlight" section is coming from, but it seems to be the only difference I can find, so I can't help but feel it is related to my troubles.
Can anyone point me in a direction that might lead to resolving this error?
On the Test server, when you search once, it shows results. When you try a new term in the same searchbox, it returns a 500 error, and the logging on the server has a long series of these:
"Thu Mar 09 13:25:48 2017
Thread: t0
Request URI: /helpdesk/maintenanceTicketMain.a5wcmp?__virtualPage=__a5RunDialog.a5w&__pageName=/helpdesk/hdmaint.a5w&__dialogFilename=maintenanceTicketMain&__alias=MAINTENANCETICK&__unsaved=no
Script: /helpdesk/__a5RunDialog.a5w
Line: 179
x_out = a5_ajax_dialog2(tmpl)
Script:json_parse() line:97
Exception has been thrown by the target of an invocation.
Invalid object passed in, ':' or '}' expected. (350): { "__dummyproperty" : [{name: 'TYPELIST', state: {page: 1, recordCount: 11, recordCountFormatted: '11', lastBreakValue: '<None>', pageCount: 1, pageSize: 20, paginated: false, _optimizedJSON: true, filter: '(Lower(type) LIKE Lower(:SEARCH_type_type1))', having: '', order: 'type', filterParameters: '0x1.ba4042p+835pn|||C|search_type_type1\n', highlight: {LOWER(TYPE): ['apn']}, whereClause: 'categoryID = :categoryID AND ( Lower(type) LIKE Lower(:SEARCH_type_type1) )', whereParameters: '127|||N|categoryid\n0|||N|typeid\n0x0.000002p-1022pn|||C|search_type_type1\n'}}, {name: 'ITEMLIST', state: {page: 1, recordCount: 0, recordCountFormatted: '0', lastBreakValue: '<None>', pageCount: 0, pageSize: 20, paginated: false, _optimizedJSON: true, filter: '', having: '', order: 'item', filterParameters: '', highlight: {}, whereClause: 'typeID = :typeID', whereParameters: '0|||N|ca
Execution Stack:
0#179 x_out = a5_ajax_dialog2(tmpl)"
When I inspect the POST requests that return the 500 response, on both Live and Test, the only difference I see is in the ''_state.listsControls' parameter, where Test has a 'highlights' property, and Live does not:
Live:
[
{
name: 'TYPELIST',
state: {
page: 1,
recordCount: 11,
recordCountFormatted: '11',
lastBreakValue: '',
pageCount: 1,
pageSize: 20,
paginated: false,
_optimizedJSON: true,
filter: '(Lower(type) LIKE Lower(: SEARCH_type_type1))',
having: '',
order: 'type',
filterParameters: '%apn%|||C|search_type_type1\n',
whereClause: 'categoryID = : categoryID AND ( Lower(type) LIKE Lower(: SEARCH_type_type1) )',
whereParameters: '127|||N|categoryid\n0|||N|typeid\n%apn%|||C|search_type_type1\n'
}
},
{
name: 'ITEMLIST',
state: {
page: 1,
recordCount: 0,
recordCountFormatted: '0',
lastBreakValue: '',
pageCount: 0,
pageSize: 20,
paginated: false,
_optimizedJSON: true,
filter: '',
having: '',
order: 'item',
filterParameters: '',
whereClause: 'typeID = : typeID',
whereParameters: '0|||N|categoryid\n0|||N|typeid\n'
}
}
]
Test:
[
{
name: 'TYPELIST',
state: {
page: 1,
recordCount: 4,
recordCountFormatted: '4',
lastBreakValue: '',
pageCount: 1,
pageSize: 20,
paginated: false,
_optimizedJSON: true,
filter: '(Lower(type) LIKE Lower(: SEARCH_type_type1))',
having: '',
order: 'type',
filterParameters: '%building%|||C|search_type_type1\n',
highlight: {
LOWER(TYPE): [
'building'
]
},
whereClause: 'categoryID = : categoryID AND ( Lower(type) LIKE Lower(: SEARCH_type_type1) )',
whereParameters: '127|||N|categoryid\n0|||N|typeid\n%building%|||C|search_type_type1\n'
}
},
{
name: 'ITEMLIST',
state: {
page: 1,
recordCount: 0,
recordCountFormatted: '0',
lastBreakValue: '',
pageCount: 0,
pageSize: 20,
paginated: false,
_optimizedJSON: true,
filter: '',
having: '',
order: 'item',
filterParameters: '',
highlight: {
},
whereClause: 'typeID = : typeID',
whereParameters: '0|||N|categoryid\n0|||N|typeid\n'
}
}
]
Now I'm not sure where this "highlight" section is coming from, but it seems to be the only difference I can find, so I can't help but feel it is related to my troubles.
Can anyone point me in a direction that might lead to resolving this error?