Hello, I have created a view to display my links but am having trouble sorting it by weight. When I either add a sort criteria or field of Web Links: Weight I get a pretty nice error. I am having trouble figuring out the issue, so any help would be appreciated. Here is the error:

user warning: Unknown column 'weblinks.weight' in 'field list' query: SELECT DISTINCT node.nid AS nid, node.title AS node_title, weblinks.url AS weblinks_url, node_revisions.body AS node_revisions_body, node_revisions.format AS node_revisions_format, node.uid AS node_uid, node.type AS node_type, weblinks.weight AS weblinks_weight FROM node node LEFT JOIN weblinks weblinks ON node.nid = weblinks.nid AND node.vid = weblinks.vid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid WHERE node.type in ('weblinks') ORDER BY weblinks_weight ASC LIMIT 0, 10 in /home/modules/views/includes/view.inc on line 765.

-Shawn

Comments

shawngoldw’s picture

Under what table in the drupal database does the weblinks weight get stored?

lostcarpark’s picture

I ran into the same problem.

I installed the Weight module. This overrides Weblink's implementation of the Weight field. You can then use the "Weight: weight" field to sort in your view.

http://drupal.org/project/weight