I'm using latest versions of WB 1.2 and WBA 1.1 and default My Edits node revision views are broken.
Exception in Workbench: Edits by user[workbench_edited]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node_revision.type' in 'where clause'
Commenting out line 112 of workbench_access.views.inc fixes temporarily, so this is propably a access_id Views Handler related issue.
// Add the access_id filter to the filters array.
$filters['access_id'] = _workbench_access_views_access_id_filter_definition();
Trying to fix and post a patch if I find the root cause. This old issue might be related:
#1095354: PDOException when I attempt to load the workbench page
Comments
Comment #1
juhaniemi commentedAfter digging deeper, this relates to not all content types being under Workbench Access. The problematic code is in workbench_access_handler_filter_access.inc line 141:
When base_table is node_revision, there is no type column. It should use the joined node table.
This is a dirty fix, since the node relationship alias is hardcoded, but somebody can provide an more generic fix:
Comment #2
juhaniemi commentedComment #3
agentrickardI can replicate the issue but that fix is very odd.
Comment #4
agentrickardBy "odd" I mean: there has to be a better method than hardcoding the name of the table. I wonder if this is a problem with how the view itself is built, as a where to node_revision (e..g $this->query->base_table) should be fine.
Comment #5
agentrickardHere's a slightly better patch.
@merlinofchaos suggests that we actually need to remove the JOIN to node_revision from the Views definition in the module.
I also think that this filter needs to only include nodes not covered by access control if no filter options are selected.
Comment #6
agentrickardThis patch seems to have the proper behavior. If the filter is not set, we allow node types not under our control, but if a filter is selected, we disallow those types from the list.
Comment #7
juhaniemi commentedThanks! Confirming #6 works.
Comment #8
stevectorThis patch also fixes the apparent issue in #1897314: Draft and Needs review pages are showing no data found
Comment #9
agentrickard@stevector -- it's the same issue :-)
Comment #10
agentrickardCommitted.
Comment #11
katannshaw commented@agentrickard: I just updated Workbench Access and I'm still having the same issue. Under "My Edits", I can only see pages from content types that have been assigned to a Workbench Access section. Is anyone else still having this issue?
Also, now when browsing through "My Workbench", a blank space also now appears above the Admin Menu when I change the "Items per page" from 25 to 50, which is attached. This happened for me in Firefox, Chrome, and IE9, and it only started happening for me with this latest update. So I'm reverting back to 7.x-1.1.
Comment #12
agentrickardPlease open a new issue with details of your configuration. The blacked-out elements don't help and the screenshot tells me nothing of value.
In future, please do not update "fixed" issues without changing the status.
Comment #13
katannshaw commentedI apologize that my attachment wasn't helpful to you; I'll start another issue on that if needed. Concerning the blacked-out elements, they included sites I was browsing, by intranet address, and other secure items that I didn't feel like sharing online. The key point I wanted to show was the big blank space at the top that only appeared for me after this fix.
When I started in this community, it had been advised by another maintainer that I shouldn't change the status of an issue report if I didn't create it or maintain it. That is why I didn't change the status.
*For me*, as I stated on #11, this patch did not fix the issue. I was trying to see if there were any other users that had experienced the same thing.
Comment #14
agentrickardThanks. You really have to change issue status, IMO, because you're saying "hey. wait, this isn't fixed."
We can work it here, if you like, but I'm not sure what to tell you.
First, clear all the caches. Especially check to see if your View has been edited from the default.
There is nothing in this patch that would create that white space. What's the HTML output that causes it?
For debugging purposes, a screenshot of the Workbench Access settings page would help, since I cannot replicate this issue.
My suspicion is that you either have a caching issue or some other issue not directly related to this patch.
Comment #15
katannshaw commentedThanks; I'll keep that in-mind for next time. I guess it can be difficult to know the rules of the community when different users and maintainers tell you different things. I really appreciate your clarification, and your work on this wonderful module.
The whitespace issue could definitely be from the Admin theme that I'm using, so I'll look further into that later and report back wherever appropriate.
Here are a few key things with what I'm experiencing:
Per your suggestion, I'm attaching my Workbench Access settings page for you to see. Could this be because I chose "Taxonomy" instead of "Menu" as the active access scheme? Sorry for the newbie question; I just want to get my head wrapped around this whole setup because it's a very helpful tool.
Thanks.
Comment #16
agentrickardThis all looks fine. I suspect that you are actually having a permissions issue and that the whitespace issue is unrelated. Using taxonomy or menu shouldn't matter.
After you install the module, you do have to assign both users and content to an editorial section. So that's the first place to look.
If the user (even user 1) is not assigned to any sections, then no results will be returned.
Since all your content types are under access control, if the content is not assigned to a section, then no results will be returned.
Comment #17
agentrickardSee also #1340492: Assign existing content to proper sections
Comment #18
katannshaw commented@agentrickard: Very good! I will follow your instructions by creating the rest of my sections and going through each existing content type to assign them to their proper section. I see now that to make Workbench Access work with existing content types, those are the steps that I'll need to take.
Thanks so much for your time; it's much appreciated!
Comment #19
agentrickardThere is a batch assign action available on the Content overview admin page.
Comment #20
katannshaw commentedThat's good to know, as I've been looking for it. Could you please forward me the path to that page? I cannot find it under the following paths:
Admin > Content
Admin > Config
Admin > Structure > Content Types
Comment #21
agentrickardAdmin > Content
Comment #22
katannshaw commentedRight on. Thanks again.
Comment #23.0
(not verified) commentedMake more readable