Problem/Motivation

Uninstalling the module leaves the datalayer__ variables in the database, despite its hook_uninstall() trying to delete them.
The code in the hook is wrong and in fact raises the following errors:

Illegal offset type in unset bootstrap.inc:1273
Illegal offset type in unset bootstrap.inc:1273
Illegal offset type in unset bootstrap.inc:1273

The implementation is quite dangerous as the hook tries to delete variables named with the content of a datalayer variable. For example if the variable schema contains a datalayer_ prefixed variable with content "site_frontpage", the site frontpage is lost.

Proposed resolution

Fix hook_uninstall().

CommentFileSizeAuthor
datalayer-uninstall.patch433 bytesgambry

Comments

gambry created an issue. See original summary.

gambry’s picture

Status: Active » Needs review
gambry’s picture

Issue tags: +Release blocker
gambry’s picture

Priority: Normal » Critical

I know this is a remote scenario, but bumping it to Critical as a variable wrongly named can cause data loss.

  • blake.thompson committed ad3d3f1 on 7.x-1.x authored by gambry
    Issue #2938007 by gambry: Uninstalling the module leaves variables in...
blake.thompson’s picture

Patch looked good, thanks @gambry

blake.thompson’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.