When configuring the sort field in a User Reference, I've selected a field that it should sort by. Unfortunately, when hitting the save button, it doesn't actually save the selected field. It will save a base table selection, but selecting a field won't save, it will simply default to the entry at the top of the list.

eg.

Sort by:
Field attached to this entity

Sort Field:
Field 1
Field 2
Field 3

If I were to select Field 3 and hit save, it will simply default back to Field 1.

Comments

Ogredude’s picture

I'm having exactly the same issue.

willhowlett’s picture

I'm getting the same issue when using a Field Collection item as a target

aquadrop’s picture

Same issue for me. Drupal 7.14 on Windows 7. Using Content as target type.
Only if I pick "don't sort" I'm able to create content. Otherwise, I get the following error:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_data_field_date0.nid' in 'where clause': SELECT field_data_field_date0.entity_type AS entity_type, field_data_field_date0.entity_id AS entity_id, field_data_field_date0.revision_id AS revision_id, field_data_field_date0.bundle AS bundle FROM {field_data_field_date} field_data_field_date0 INNER JOIN {node} node ON field_data_field_date0.nid = node.nid WHERE (field_data_field_date0.deleted = :db_condition_placeholder_0) AND (field_data_field_date0.entity_type = :db_condition_placeholder_1) AND (field_data_field_date0.bundle IN (:db_condition_placeholder_2)) AND (node.language IN (:db_condition_placeholder_3, :db_condition_placeholder_4)) AND ( EXISTS (SELECT na.nid AS nid FROM {node_access} na WHERE (( (na.gid = :db_condition_placeholder_5) AND (na.realm = :db_condition_placeholder_6) )OR( (na.gid = :db_condition_placeholder_7) AND (na.realm = :db_condition_placeholder_8) )OR( (na.gid = :db_condition_placeholder_9) AND (na.realm = :db_condition_placeholder_10) )OR( (na.gid = :db_condition_placeholder_11) AND (na.realm = :db_condition_placeholder_12) ))AND (na.grant_view >= :db_condition_placeholder_13) AND (field_data_field_date0.entity_id = na.nid) )) AND(( (field_data_field_date0.entity_type = :db_condition_placeholder_14) )OR (field_data_field_date0.entity_type <> :db_condition_placeholder_15) )AND ( EXISTS (SELECT na.nid AS nid FROM {node_access} na WHERE (( (na.gid = :db_condition_placeholder_16) AND (na.realm = :db_condition_placeholder_17) )OR( (na.gid = :db_condition_placeholder_18) AND (na.realm = :db_condition_placeholder_19) )OR( (na.gid = :db_condition_placeholder_20) AND (na.realm = :db_condition_placeholder_21) )OR( (na.gid = :db_condition_placeholder_22) AND (na.realm = :db_condition_placeholder_23) ))AND (na.grant_view >= :db_condition_placeholder_24) AND (field_data_field_date0.nid = na.nid) )) ORDER BY field_data_field_date0.field_date_value DESC; Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => node [:db_condition_placeholder_2] => flipping_book [:db_condition_placeholder_3] => en [:db_condition_placeholder_4] => und [:db_condition_placeholder_5] => 0 [:db_condition_placeholder_6] => all [:db_condition_placeholder_7] => 64 [:db_condition_placeholder_8] => content_access_author [:db_condition_placeholder_9] => 2 [:db_condition_placeholder_10] => content_access_rid [:db_condition_placeholder_11] => 4 [:db_condition_placeholder_12] => content_access_rid [:db_condition_placeholder_13] => 1 [:db_condition_placeholder_14] => node [:db_condition_placeholder_15] => node [:db_condition_placeholder_16] => 0 [:db_condition_placeholder_17] => all [:db_condition_placeholder_18] => 64 [:db_condition_placeholder_19] => content_access_author [:db_condition_placeholder_20] => 2 [:db_condition_placeholder_21] => content_access_rid [:db_condition_placeholder_22] => 4 [:db_condition_placeholder_23] => content_access_rid [:db_condition_placeholder_24] => 1 ) in field_sql_storage_field_storage_query() (line 577 of <strong>[Install path]</strong>\modules\field\modules\field_sql_storage\field_sql_storage.module).

danny englander’s picture

I just ran up against this issue as well with Sort by: Field attached to this entity. No matter what item I choose in the select list, after saving it reverts back to the first item as described above. I am using the lastest dev from June 18, 2012 so I don't know if I should file a separate issue since this is against RC1.

rafamd’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
Component: Miscellaneous » Code

@highrockmedia, we don't need a separate bug report, just point this one to dev.

jacerider’s picture

StatusFileSize
new1.2 KB

Give this patch a try...

rafamd’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, patch_commit_3f66da0b6291.patch, failed testing.

jacerider’s picture

Status: Needs work » Needs review
StatusFileSize
new811 bytes

Guess I should format the patch correctly so it can be tested...

dxvargas’s picture

dxvargas’s picture

Status: Needs review » Reviewed & tested by the community
damien tournoud’s picture

Status: Reviewed & tested by the community » Closed (cannot reproduce)

This has been fixed independently with the new UI.