I'm trying to modify the default file list view (called workbench_files in the views ui) so that it only lists files that are attached to nodes the user has editing rights to.

My first step was to add the Workbench Access: Section field to the view, but that stopped me cold with this error:

Debug:

'Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column \'access_id\' in \'field list\''

in views_plugin_query_default->execute() (line 1380 of /home/reagand/dev/drupal/wfiles/sites/all/modules/views/plugins/views_plugin_query_default.inc).

Any suggestions on how to go about this?

CommentFileSizeAuthor
#6 fileListView.txt5.15 KBjerrac
#4 workbench_files.view_.inc_.txt12.29 KBjerrac

Comments

jerrac’s picture

Well, I just ran some updates and tests. Still get the same problem.

Should I move this to the Views issue queue?

jerrac’s picture

Title: How to modify the default file list view to only show files that are in sections user has access to? » How to modify the Workbench Files default file list view to only show files that are in sections user has access to?
Project: Workbench Files » Views (for Drupal 7)
Version: 7.x-1.0-beta5 » 7.x-3.x-dev
Component: Miscellaneous » Code
Category: support » bug

Moving this to Views since the error is reported to be in a views file. As well as the lack of response.... Feel free to tell me off if this should have stayed in Workbench Files. I'm really not sure which module is where the problem lies.

dawehner’s picture

Can you give at least some context of the problem?

For example a view to reproduce the problem would be cool. In general this seems to be a bug of workbench files.

jerrac’s picture

StatusFileSize
new12.29 KB

All I am doing is trying to add the Workbench Access: Section field to the default view from Workbench Files.

I've attached the views file from Workbench Files, if that helps.

To try to reproduce the problem, here are the modules and versions:

ctools-7.x-1.x-dev
views and views ui 7.x-3.x-dev
Workbench 7.x-1.0-beta5
Workbench Access 7.x-1.x-dev
Workbench Files 7.x-1.0-beta5

Enable them, then go edit the workbench_files view, and try to add the Workbench Access: Section field.

If I leave all settings at there default and apply to all displays, I get a green message in the auto preview section that says "1308163362", and a red message that says "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'access_id' in 'field list'"

If I save the view and go to /admin/workbench/files I get the error I first posted.

jerrac’s picture

So, I just updated Views and Workbench Access, uninstalled and reinstalled Workbench Files, and now the Files List (/admin/workbench/files) isn't showing anything at all. So, yeah, not sure what's going on.

Just reported a bug for Workbench files. http://drupal.org/node/1189712

jerrac’s picture

Title: How to modify the Workbench Files default file list view to only show files that are in sections user has access to? » How to create a list of files that only show files that are in Workbench Access sections the user has access to?
StatusFileSize
new5.15 KB

Well, since Workbench Files broke with the latest update, I created my own view with very little to it.

Modules I am running (I ran drush up to make sure they are the newest versions):
Drupal - 7.2
Chaos tools - 7.x-1.x-dev
Views - 7.x-3.x-dev
Views UI - 7.x-3.x-dev
Workbench - 7.x-1.0-beta6
Workbench Access - 7.x-1.0-beta6
The default Core modules...

I get exactly the same errors as before.

Is there something wrong with the Workbench Access Section Field?

How are fields found by Views?

dawehner’s picture

Project: Views (for Drupal 7) » Workbench Access
Version: 7.x-3.x-dev » 7.x-1.x-dev

This really seems to be an issue with workbench because they seem to implement an handler here.

agentrickard’s picture

This definitely belongs over here.

jerrac’s picture

So, I just installed the dev version of Workbench Access that was updated June 25th, as well as updates to Views and Ctools. And that error is no longer a problem. I can add the Workbench Sections field to the view just fine.

Now I just need a way to limit the files that are displayed to the files that are on nodes in sections the user has access to. Hmmm....

jerrac’s picture

Is there a way to add an option to the "Workbench Access: Access filter" that would let me tell it to only show entities/files that are in sections the user can access?

agentrickard’s picture

Category: bug » feature

No.

delacosta456’s picture

hi
for readers following this https://www.drupal.org/node/1191484may help in the future.

Thanks

agentrickard’s picture

Status: Active » Closed (won't fix)

7.x is closed.