Hi All,

When trying to sort a view using Style: Table with the settings as shown in settings.png (attached) i get the following notice and error:

Notice: Undefined index: field_company_building_city_value in views_handler_field_field->click_sort() (regel 130 van C:\xampplite\htdocs\gvanpijkeren.nl\sites\all\modules\views\modules\field\views_handler_field_field.inc).
Statusbericht
Debug:

'Exception: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'ASC
LIMIT 10 OFFSET 0\' at line 2'

in views_plugin_query_default->execute() (regel 1314 van C:\xampplite\htdocs\gvanpijkeren.nl\sites\all\modules\views\plugins\views_plugin_query_default.inc).

This only happens when i am trying to sort by custom field. Sorting by the Title field works like a charm.

I attached the error in the error.png file.

CommentFileSizeAuthor
error.png29.01 KBstrakkie
settings.png38.47 KBstrakkie

Comments

bojanz’s picture

Status: Active » Postponed (maintainer needs more info)

This is related to #1018766: Fix click_sort on Field API fields .

Please copy the whole generated query.

strakkie’s picture

Status: Postponed (maintainer needs more info) » Fixed

Fixed with the patch 1018766-views-clicksort.patch, from the related issue.
Thanx!

bojanz’s picture

That patch was already in CVS, I guess you didn't have a recent dev...

tinny’s picture

im not sure how to use the patch given but i get the same error as op

bojanz’s picture

Update to 7.x-3x-dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.