Hello,

I'm having this error when trying to save a node enriched with workbench moderation.

My env : Drupal 8.2.5, pgsql

Reproduction step :

User not admin (without "bypass group access" i think)
Enable workbench moderation
Enable gnode (no need to apply it to a particular content)
Save a new content example for "page" (whatever its state is)

Référer /node/add/page
Message Drupal\Core\Database\TransactionNameNonUniqueException : mimic_implicit_commit is already in use. dans Drupal\Core\Database\Connection->pushTransaction() (lign 1121 /web/core/lib/Drupal/Core/Database/Connection.php).

With debug & callstack, it comes from gnode_node_grants:132, didnot investigate yet

CommentFileSizeAuthor
#14 behat-callstack.txt20.88 KBsylus
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Oulalahakabu created an issue. See original summary.

sylus’s picture

I am getting this exact same issue as well, whenever trying to add a content type. Seems to be consistent with postgres environments.

sylus’s picture

Title: Troubleshoting gnode / Workbench moderation » Troubleshooting postgres issues with gnode / Workbench moderation
sylus’s picture

Priority: Normal » Major
sylus’s picture

Version: 8.x-1.0-beta4 » 8.x-1.x-dev
sylus’s picture

Title: Troubleshooting postgres issues with gnode / Workbench moderation » Postgres broken with gnode enabled
sylus’s picture

sylus’s picture

Priority: Major » Normal
sylus’s picture

Title: Postgres broken with gnode enabled » Troubleshooting postgres issues with gnode_node_grants + contrib
sylus’s picture

sylus’s picture

Priority: Normal » Major
jeremdow’s picture

Same here. Drupal 8.3.7, PostgreSQL 9.6

sylus’s picture

Reproduction Steps

1) Install Drupal (v8.3.5+)
2) Install Workbench Moderation (v1.2)
3) Add just the following hook which can be empty:

use Drupal\Core\Session\AccountInterface;
function modulename_node_grants(AccountInterface $account, $op) {
}

Now whenever I run a behat test or even a migration import on a postgres db I always get "mimic_implicit_commit". I did manage to fix the migration issues by just disabling all workbench moderation hooks via migrate booster.

Migrate Booster

$config['migrate_booster.settings']['hooks'] = [
  # Entity insert
  'entity_insert' => [
    'workbench_moderation',
  ],
  # Entity update
  'entity_update' => [
    'workbench_moderation',
  ],
  # Entity presave
  'entity_presave' => ['workbench_moderation'],
];

Behat

  @breadcrumb @javascript
  Scenario: User leveraging the breadcrumbs to navigate to landing page content type
    Given I am logged in as a user with the "administrator" role
    And landing_page content:                                                        # Drupal\DrupalExtension\Context\DrupalContext::createNodes()
      | title  | path    | moderation_state |
      | Foobar | /foobar | published       |
      Drupal\Core\Database\TransactionNameNonUniqueException: mimic_implicit_commit is already in use. in /var/www/html/core/lib/Drupal/Core/Database/Connection.php:1147

This simple Behat test highlights the `mimic_implicit_commit` issue I am having on postgreSQL databases. The full stack trace is attached as a subsequent file upload.

I also should note that content moderation (in Drupal core) also has this same problem.

sylus’s picture

FileSize
20.88 KB
sylus’s picture

Title: Troubleshooting postgres issues with gnode_node_grants + contrib » Troubleshooting postgres issues with hook_node_grants + workbench moderation
Project: Group » Workbench Moderation
Component: Group Node (gnode) » Code