-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Describe the bug
When using a custom object as a location if Featured is not a field on the object the json endpoint generates invalid json.
To Reproduce
Steps to reproduce the behavior:
- Create a custom location object without a
Featuredfield - Set locator to use new class as location
- run a dev/build?flush=all
- visit the locator page and add the
jsonaction
Expected behavior
Valid json is generated
This is what is generated currently without a Featured field of getter
{
"locations":[
{
"ID":1,
"Title":"#1",
"Featured":,
"Website":"",
"Phone":"",
"Fax":"",
"Email":"",
"Address":"",
"Address2":"",
"City":"Sheboygan",
"State":"WI",
"PostalCode":"53081",
"Country":"us",
"Distance":-1,
"Lat":43.7013054,
"Lng":-87.7271123
}
]
}Possible solutions
Make data templates try to find location object specific templates. Possibly add fall back support to a basic template with bare minimum field requirements.
The fix should also be implemented to the XML feed to keep everything consistent.
Metadata
Metadata
Assignees
Labels
No labels