After applying #3069919: minor module updates I get an error when editing a page:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base.status' in 'field list': SELECT base.rid AS rid, base.hash AS hash, base.type AS type, base.uid AS uid, base.source AS source, base.source_options AS source_options, base.redirect AS redirect, base.redirect_options AS redirect_options, base.language AS language, base.status_code AS status_code, base.count AS count, base.access AS access, base.status AS status FROM {redirect} base WHERE (base.redirect = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => node/196 ) in DrupalDefaultEntityController->load() (regel 198 van /includes/entity.inc).

Looks like it's this issue: #2578019: PDOException: SQLSTATE[42S22]: Column not found -- unknown column 'base.status' in 'field list'

Comments

JoshaHubbers created an issue. See original summary.

kevin.-’s picture

Title: PDO exeption after module upgrades » PDO exception after module upgrades
Priority: Normal » Major
Status: Needs review » Active
joshahubbers’s picture

StatusFileSize
new1.32 KB

In the dvg_domain_prefix module we add a table prefix for the redirect table for each domain. Thus when we run a db update, the "status"-field is only added to the active domain.

We added an update hook to this module which adds the status-field to each domain-table.

joshahubbers’s picture

Status: Active » Needs review
paulvandenburg’s picture

StatusFileSize
new1.98 KB
new1.2 KB

Seems like a fine solution to me.

However I've changed 3 things:

  • Removed the module exists check for domain, the dvg_domain_prefix module already has a dependency on the domain module. It is safe to assume it exists.
  • I've replaced the short array syntax with the longer version, for consistency.
  • Grouped the table exists check and field not exists so we have less nesting for the same result.
joshahubbers’s picture

Status: Needs review » Reviewed & tested by the community

Yes, editing is available again.

paulvandenburg’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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