Skip to content
This repository has been archived by the owner on Feb 23, 2020. It is now read-only.

Possible problem with RNG and CONTENT ACCESS #71

Closed
SOLUTIONS-AT opened this issue Jan 28, 2016 · 3 comments
Closed

Possible problem with RNG and CONTENT ACCESS #71

SOLUTIONS-AT opened this issue Jan 28, 2016 · 3 comments
Assignees
Labels

Comments

@SOLUTIONS-AT
Copy link

I have an issue with a D8.0.2 site which has me baffled.

The site has RNG installed. I started having problems when we tried using the
module CONTENT ACCESS. The error looks like it might be related to RNG in
conjunction with CONTENT ACCESS. Please let me know your thoughts.

Here is the error which I get, when an anonymous User pulls up a basic page
for which the anonymous User has access permission set in CONTENT ACCESS:

The website encountered an unexpected error. Please try again later.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not
found: 1054 Unknown column 'grant_manageevent' in 'where clause': SELECT 1 AS
expression FROM {node_access} node_access WHERE (grant_manageevent >=
:db_condition_placeholder_0) AND(( (nid = :db_condition_placeholder_1) AND
(langcode = :db_condition_placeholder_2) )OR (nid =
:db_condition_placeholder_3) )AND(( (gid IN (:db_condition_placeholder_4))
AND (realm = :db_condition_placeholder_5) )OR( (gid IN
(:db_condition_placeholder_6)) AND (realm = :db_condition_placeholder_7) )OR(
(gid IN (:db_condition_placeholder_8)) AND (realm =
:db_condition_placeholder_9) )) LIMIT 1 OFFSET 0; Array (
[:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 2
[:db_condition_placeholder_2] => en [:db_condition_placeholder_3] => 0
[:db_condition_placeholder_4] => 0 [:db_condition_placeholder_5] => all
[:db_condition_placeholder_6] => 0 [:db_condition_placeholder_7] =>
content_access_author [:db_condition_placeholder_8] => 1
[:db_condition_placeholder_9] => content_access_roles ) in
Drupal\node\NodeAccessControlHandler->checkAccess() (line 112 of
core/modules/node/src/NodeAccessControlHandler.php).
Drupal\Core\Database\Statement->execute(Array, Array)
Drupal\Core\Database\Connection->query('SELECT 1 AS expression
FROM
{node_access} node_access
WHERE (grant_manageevent >= :db_condition_placeholder_0) AND(( (nid =
:db_condition_placeholder_1) AND (langcode = :db_condition_placeholder_2) )OR
(nid = :db_condition_placeholder_3) )AND(( (gid IN
(:db_condition_placeholder_4)) AND (realm = :db_condition_placeholder_5) )OR(
(gid IN (:db_condition_placeholder_6)) AND (realm =
:db_condition_placeholder_7) )OR( (gid IN (:db_condition_placeholder_8)) AND
(realm = :db_condition_placeholder_9) ))
LIMIT 1 OFFSET 0', Array, Array)
Drupal\Core\Database\Driver\mysql\Connection->query('SELECT 1 AS expression
FROM
{node_access} node_access
WHERE (grant_manageevent >= :db_condition_placeholder_0) AND(( (nid =
:db_condition_placeholder_1) AND (langcode = :db_condition_placeholder_2) )OR
(nid = :db_condition_placeholder_3) )AND(( (gid IN
(:db_condition_placeholder_4)) AND (realm = :db_condition_placeholder_5) )OR(
(gid IN (:db_condition_placeholder_6)) AND (realm =
:db_condition_placeholder_7) )OR( (gid IN (:db_condition_placeholder_8)) AND
(realm = :db_condition_placeholder_9) ))
LIMIT 1 OFFSET 0', Array, Array)
Drupal\Core\Database\Query\Select->execute()
Drupal\node\NodeGrantDatabaseStorage->access(Object, 'manage event', Object)
Drupal\node\NodeAccessControlHandler->checkAccess(Object, 'manage event',
Object)
Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'manage event',
Object, 1)
Drupal\node\NodeAccessControlHandler->access(Object, 'manage event', Object,
1)
Drupal\node\Entity\Node->access('manage event', Object, 1)
Drupal\Core\Entity\EntityAccessCheck->access(Object, Object, Object)
call_user_func_array(Array, Array)
Drupal\Core\Access\AccessManager->performCheck('access_check.entity', Object)
Drupal\Core\Access\AccessManager->check(Object, Object, NULL, 1)
Drupal\Core\Access\AccessManager->checkNamedRoute('rng.event.node.event',
Array, Object, 1)
Drupal\Core\Menu\LocalTaskManager->getTasksBuild('entity.node.canonical',
Object)
Drupal\Core\Menu\LocalTaskManager->getLocalTasks('entity.node.canonical', 0)
Drupal\Core\Menu\Plugin\Block\LocalTasksBlock->build()
Drupal\block\BlockViewBuilder::preRender(Array)
call_user_func('Drupal\block\BlockViewBuilder::preRender', Array)
Drupal\Core\Render\Renderer->doRender(Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL,
1)
__TwigTemplate_9326ecb63b8e6b2d281abe954b73f70cfe1b45ebbf58df29932e7a7b4ee72399->block_header(Array,
Array)
Twig_Template->displayBlock('header', Array, Array)
__TwigTemplate_9326ecb63b8e6b2d281abe954b73f70cfe1b45ebbf58df29932e7a7b4ee72399->block_main(Array,
Array)
Twig_Template->displayBlock('main', Array, Array)
__TwigTemplate_9326ecb63b8e6b2d281abe954b73f70cfe1b45ebbf58df29932e7a7b4ee72399->doDisplay(Array,
Array)
Twig_Template->displayWithErrorHandling(Array, Array)
Twig_Template->display(Array)
Twig_Template->render(Array)
twig_render_template('themes/bootstrap/templates/system/page.html.twig',
Array)
Drupal\Core\Theme\ThemeManager->render('page', Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL,
1)
__TwigTemplate_3df85e3dd5c38c4489f6abf6fff9df940792e05f35219f3efece20139ae05e3b->doDisplay(Array,
Array)
Twig_Template->displayWithErrorHandling(Array, Array)
Twig_Template->display(Array)
Twig_Template->render(Array)
twig_render_template('themes/bootstrap/templates/system/html.html.twig',
Array)
Drupal\Core\Theme\ThemeManager->render('html', Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object,
Object)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object,
'kernel.view', Object)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view',
Object)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\ban\BanMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)

I would appreciate if you have any feedback.

@dpi dpi self-assigned this Jan 28, 2016
@dpi dpi modified the milestone: Core Compatibility Jan 28, 2016
@dpi dpi added the defect label Jan 28, 2016
@dpi
Copy link
Owner

dpi commented Jan 28, 2016

Spent 30 mins on this, looks like a core bug. Not due to content_access directly, but because content_access implements node grants. Ill post a quick workaround, which is to patch core, hopefully in the next 24 hours. Ill post a core issue so you don't have to continue to patch core manually.

@SOLUTIONS-AT
Copy link
Author

That would be great!

@dpi
Copy link
Owner

dpi commented Jan 29, 2016

Follow the core issue at Unexpected access operation throws exception when node grant system is active.

A patch will be uploaded shortly.

@dpi dpi closed this as completed Jan 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants