I have a newly installed drupal with minimum profile, version 8.1.1.
I enabled views module.
I added a content type and installed Workbench and Workbench moderation modules.
I enabled moderation states for my content type.
I added Access My Workbench permission to authenticated users.
When I click on My Workbench button I receive the following error:
Recoverable fatal error: Argument 1 passed to Drupal\views\ViewExecutableFactory::get() must implement interface Drupal\views\ViewEntityInterface, null given, called in /var/www/html/.../core/modules/views/src/Plugin/Block/ViewsBlockBase.php on line 69 and defined in Drupal\views\ViewExecutableFactory->get() (line 70 of /var/www/html/.../core/modules/views/src/ViewExecutableFactory.php).
After some investigations it occured that the views.view.workbench_current_user.yml file in workbench/config/optional folder was not imported. The possible reason might be that it refers to user_picture field
user_picture:
id: user_picture
table: user__user_picture
field: user_picture
which I do not have because of my minimum install profile.
Comment | File | Size | Author |
---|---|---|---|
#4 | workbench-check_view_existence-2732119-4.patch | 2.99 KB | rooby |
#3 | workbench-check_view_existence-2732119-3.patch | 738 bytes | rooby |
Comments
Comment #2
rooby CreditAttribution: rooby commentedI am having the same problem, except mine shows up as this error:
While checking for the existence of the view in WorkbenchContentController::content() would stop the error it seems like it would be better to not have the user picture in this view. It doesn't seem necessary and lots of sites don't use the user picture.
Comment #3
rooby CreditAttribution: rooby commentedThis patch checks the existence of views before trying to render them (not sure if there is a better way of determining the existence of a view).
Comment #4
rooby CreditAttribution: rooby commentedHere is a patch that removes the picture dependency from that view.
Not sure which of the 2 approaches would be preferred.
Comment #5
laszlo.kovacsI installed drupal with minimal profile.
Enabled workbench and workbench moderation.
Applied the patches #3 and #4 and the problem was gone.
Thank you :-)
Comment #6
geoffvio CreditAttribution: geoffvio commentedI also have an error when open "My Workbench", but seems a different one, a problem with langcode column...
[Wed Jun 15 17:49:03 2016] [error] [client XXX.XXX.XXX.XXX] Uncaught PHP Exception Drupal\\Core\\Database\\IntegrityConstraintViolationException: "SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'langcode' in field list is ambiguous: SELECT node_field_data_node_field_revision.langcode AS node_field_data_node_field_revision_langcode, node_field_revision.vid AS vid, users_field_data_node_field_revision.uid AS users_field_data_node_field_revision_uid, node_field_data_node_field_revision.nid AS node_field_data_node_field_revision_nid, langcode AS langcode\nFROM \n{node_field_revision} node_field_revision\nLEFT JOIN {users_field_data} users_field_data_node_field_revision ON node_field_revision.uid = users_field_data_node_field_revision.uid\nLEFT JOIN {node_field_data} node_field_data_node_field_revision ON node_field_revision.vid = node_field_data_node_field_revision.vid\nINNER JOIN {users} users_field_data_node_field_revision__users ON users_field_data_node_field_revision.uid = users_field_data_node_field_revision__users.uid\nWHERE ((( (users_field_data_node_field_revision__users.uid = :db_condition_placeholder_0) )AND (node_field_data_node_field_revision.type IS NOT NULL ) ))\nORDER BY node_field_revision.changed DESC\nLIMIT 5 OFFSET 0; Array\n(\n [:db_condition_placeholder_0] => 1\n)\n" at /var/www/html/d8_sandbox/core/lib/Drupal/Core/Database/Connection.php line 668, referer: http://server:8004/fr/admin/structure
Comment #7
rooby CreditAttribution: rooby commented@geoffvio:
I think that one looks different enough that it should have it's own issue.
Comment #8
agentrickardThe issue in #5 is already fixed. Please do not cloud issues with unrelated reports.
Comment #9
agentrickardSo this issue in general is about the problem of shipping default views. There are two other items that we might address here:
1) How to make it so the default view callback in the controller can be overridden?
2) How to extend Views when modules like Workbench Access are installed?
Given that the user picture is part of the default profile for Drupal installs, I don't see any urgency to remove it from the provided view. For cases like these, it's easy enough to edit and re-export the view. (There are people, in fact, who argue that we shouldn't ship default views at all.)
We have to cover the 80% case.
Checking for the existence of the view seems reasonable here.
Comment #11
agentrickardThe Views check patch has been committed.
Leaving this open for ideas about the issues raised in comment 9.
Comment #12
agentrickardComment #14
agentrickard