When drilling down from Country->state->city using the location_directory view, if the results at that level do not have a value set, then there is no link provided to view the results. For example, if looking at US->TX, all the texas cities will be displayed with a link on the city name to view the individual results, but for those results who have TX as the state, but no city name set, an empty bulleted line is displayed with no ability to view the cityless results. E.g.:

* (3)
* Austin (4)
* Auston (1)

One can also see this behavior on the current ElderWeb demo page:

http://www.elderweb.com/demo/views/directory/us

Attached is a patch that will put in "unknown" as replacement text for those results with no value for the field. This will at least allow the results to be accessed. Ideally, the text should be configurable, right now it's defined as a constant in this patch. Also, this patch will likely only work with MySQL since the conditional syntax used in the query is specific to it. Not sure how else to handle this more cleanly within the views control flow and data structures other than to have some branch logic for each supported DB.

CommentFileSizeAuthor
empty_field.patch1.83 KBdayre

Comments

karens’s picture

Status: Needs review » Fixed

Just getting ready to commit a fix similar to the one you proposed. Thanks for the code and sorry for the delay!

Anonymous’s picture

Status: Fixed » Closed (fixed)