Problem/Motivation

Testing against Drupal 8.3 with the following modules installed:

 "drupal/replication": "1.x-dev",
        "drupal/multiversion": "1.x-dev",
        "drupal/key_value": "~1.1",
        "drupal/conflict": "~1.0",
        "drupal/deploy": "~1.0",
        "drupal/workspace": "~1.0",
        "drupal/relaxed": "1.x-dev",
        "drupal/workbench": "1.x-dev",
        "drupal/workbench_moderation": "~1.2",

Additionally installed content translation (with patches 2816647 and 2816703 for replication and multiversion) to enable translations to work with workspaces.

All works fine other than when I go to the My Edits tab and receive the following error:

Error: Call to a member function getCacheTags() on null in Drupal\views\Plugin\views\query\Sql->getCacheTags() (line 1622 of 

A previous issue which seems related is #2730597: HTTP 500 Fatal errors on admin/workbench which reported that this patch #2714989: Views which load the same entity type as entity and non default revision cause fatal in Sql::getCacheTags() now committed to core should fix the issue. I haven't investigated any further, perhaps the issues mentioned are now un-related and it is still an issue of views. But reporting it here incase anyone has any insight and can help.

Comments

roborew created an issue. See original summary.

roborew’s picture

Priority: Normal » Major

Upping to Major as feel translation should be supported by workbench as a content workflow.

ramez.gaberiel’s picture

I experienced the same issue, I haven't had time to delve deeper in the issue yet, but a temporary way to at least get a working page without the error is to go edit the view: Workbench: Edits by user. Click on Caching under the Advanced column and select off instead of Tag based. That should get the My workbench page working again, but i'm not sure what other side effects that will have yet.

agentrickard’s picture

As the OP notes, I thought we already fixed this issue in https://www.drupal.org/node/2730597#comment-11364215

I suppose we just have to disable the CacheTag on the view that we ship?

agentrickard’s picture

pavlosdan’s picture

Had the same issue and applied the patch from the linked issue in #5 just to see if it fixes it. It doesn't. Turning off the cache as suggested in #3 helps getting the view working again for now.

agentrickard’s picture

If you upgrade to beta1, I came up with a different solution to this problem -- which, to be clear, is really outside of the control of Workbench as far as I can tell.

You can either edit the View that is provided, or clone it an register a new View to use for that page. See the release notes for beta1.

roborew’s picture

Issue summary: View changes
taggartj’s picture

MMM I had an issue like this, but happend when i did a site install .... then imported my database ... for some reason the error would apper
Untill you create a new node with draft then i found...

public function query() {
   // The table doesn't exist until a moderated node has been saved at least
   // once. Just in case, disable this filter until then. Note that this means
   // the view will still show all revisions, not just latest, but this is
   // sufficiently edge-case-y that it's probably not worth the time to
   // handle more robustly.
   if (!$this->connection->schema()->tableExists('workbench_revision_tracker')) {
     return;
   }

so the fix was create the table on install ...

but then i had another error after deleting a revision
and going back to the admin/workbench
and got the sqlcache error

this was caused by the views query being cached so needed on my delete revision alter had to add
Drupal::service('page_cache_kill_switch')->trigger();

just putting this here incase it helps anyone.