Drupal 5.3
Workflow 1.1
CCK 1.6
Views 1.6

This one is a little complicated (lots of parts). Hope you can help?

Situation:
I have a content type that utilizes the CCK nodereference field with multiple values possible. I have created a view of this content type.
All is well.

I wanted to add workflow and workflow_access. I enabled workflow first. I did not create a workflow. All is still well.

Problem:
But when I enabled workflow_access. The view was now broken with a SQL syntax error.

user warning: 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 'DISTINCT(node.nid) FROM node node LEFT JOIN content_field_bio_from_dataset node_' at line 1 query: SELECT node_data_field_bio_from_dataset.field_bio_from_dataset_nid AS DISTINCT(node.nid) FROM node node LEFT JOIN content_field_bio_from_dataset node_data_field_bio_from_dataset ON node.vid = node_data_field_bio_from_dataset.vid WHERE node.nid = 41 ORDER BY node_data_field_bio_from_dataset.delta in /www/html/5/includes/database.mysql.inc on line 172.

Clues:
After playing around for awhile, I found that If I removed the "multiselect" option from the Nodereference field the error would go away. You also don't get the error if the field holds no data.

I also can remove the error by removing workflow_access. There is not a good uninstaller for workflow_access so I had to go into Node_access table and reset the node permissions by hand. But after that all is well again.

The problem does not exist for CCK text field with multiselect.

I was able to reproduce this building a site from scratch on a separate server. I am running no other ACL modules.

Ideas?

Comments

emdalton’s picture

I get the same error if I try to disable workflow and workflow_access after having used it for a while. Workflow needs an uninstaller. How do I reset the node permissions in the node_access table? That is, which column to I need to change? Is it "grant update"?

emdalton’s picture

Just an additional note -- I tried http://mydomain.com/?q=admin/content/node-settings/rebuild as suggested at http://drupal.org/node/147961, and while the rebuild was successful, it didn't solve the SQL errors.

doc2@drupalfr.org’s picture

It's been a long time! Anything new here? I have a problem which seems similar...

SlipAngel’s picture

I am getting an identical error with CCK, Views, and Simple Access, as well as CCK, Views, and NodeAccess. Any insight?

yhager’s picture

subscribing

Michael Hofmockel’s picture

Assigned: Unassigned » Michael Hofmockel
Status: Active » Closed (fixed)

Since there has been no discussion of this since 2008. I am closing this issue and marking fixed.