I installed Flexiaccess some time ago on a dev site, while exploring a number of features and options. In the end I opted for Content Access and today I attempted to uninstall Flexiaccess using Drush.

It failed, with the following scary messages:

drush pm-uninstall flexiaccess
The following modules will be uninstalled: flexiaccess
Do you really want to continue? (y/n): y
WD php: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '24009-0-all' for key 'PRIMARY': INSERT INTO {node_access} (nid, realm, gid, grant_view,   [error]
grant_update, grant_delete) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4,
:db_insert_placeholder_5); Array
(
    [:db_insert_placeholder_0] => 24009
    [:db_insert_placeholder_1] => all
    [:db_insert_placeholder_2] => 0
    [:db_insert_placeholder_3] => 1
    [:db_insert_placeholder_4] => 0
    [:db_insert_placeholder_5] => 0
)
 in node_access_write_grants() (line 3563 of /home/xxx-domain-xxx>/public_html/modules/node/node.module).
Cannot modify header information - headers already sent by (output started at /usr/local/lib/php/drush/includes/output.inc:38) bootstrap.inc:1232                                      [warning]
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '24009-0-all' for key 'PRIMARY': INSERT INTO {node_access} (nid, realm, gid, grant_view, grant_update, grant_delete) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array
(
    [:db_insert_placeholder_0] => 24009
    [:db_insert_placeholder_1] => all
    [:db_insert_placeholder_2] => 0
    [:db_insert_placeholder_3] => 1
    [:db_insert_placeholder_4] => 0
    [:db_insert_placeholder_5] => 0
)
 in node_access_write_grants() (line 3563 of /home/xxx-domain-xxx/public_html/modules/node/node.module).
Drush command terminated abnormally due to an unrecoverable error.                                                                                                                     [error]

I tried again, and this time got a timeout error

Maximum execution time of 240 seconds exceeded in /home/xxx-domain-xxx/public_html/includes/database/database.inc

What am I doing wrong, and (more importantly) how can I safely uninstall Flexiaccess?

Comments

maranjo created an issue. See original summary.

nattyweb’s picture

UPDATE: I repeated the process four times, and it finally uninstalled successfully on the last attempt. All seems well, problem over.

gisle’s picture

Status: Active » Postponed (maintainer needs more info)

Nice to hear it worked out. However, if this is a general problem, it should be fixed.

I've looked into it, but I am unable to reproduce. So far, Flexi Accces has uninstalled cleanly in all cases. Sequences tested so far (all on a clean install of latest core):

  • Install and enable Flexi Accces. Disable and uninstall Flexi Accces. Result: OK.
  • Install and enable Flexi Accces. Install and enable Content Accces. Disable and uninstall Flexi Accces. Result: OK.

I am not able to pursue debugging this without being able to reproduce the problem on a clean install. Postponing.

nattyweb’s picture

I suspect it was a consequence of having tens of thousands of nodes and multiple content access modules enabled and disabled during the dev process, and therefore a unique circumstance.

I suggest this is removed as an issue, or marked as Closed.

Thanks for your quick reply gisle - much appreciated.

gisle’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing.