Skip to content

Missing column allow_checksum_access not created on fresh install #35

@frerghost

Description

@frerghost

Bug Schema migration
Missing column allow_checksum_access not created on fresh install
Extension: au.com.agileware.elections
CiviCRM: 6.13.1
WordPress: Bitnami on Amazon AWS
Reported: April 15, 2026
Summary
After a fresh install of the Elections extension on CiviCRM 6.13.1 (WordPress 6.9.4), the Elections page throws a fatal DB Error: no such field exception. The extension's database tables are created but the allow_checksum_access column is missing from civicrm_election. The column exists in the .entityType.php schema definition but is never applied to the existing table during install or upgrade. Works now using Claude to do changes and original error image at bottom.

Error thrown
CRM_Core_Exception: DB Error: no such field
in CRM/Elections/Page/Elections.php on line 65

nativecode=1054 ** Unknown column 'a.allow_checksum_access' in 'SELECT'

SELECT a.id, a.name, ..., a.allow_checksum_access, ...
FROM civicrm_election a LIMIT 25 OFFSET 0
Environment
Platform: WordPress on Bitnami stack, Amazon AWS EC2
CiviCRM version: 6.13.1
Extension: au.com.agileware.elections (latest from GitHub master)
Database: MariaDB (Bitnami bundled, deprecating mysql binary in favor of mariadb)
PHP path: /opt/bitnami/wordpress
Steps to reproduce
1
Install CiviCRM 6.13.1 on WordPress (Bitnami/AWS).
2
Download and install the Elections extension via Administer → System Settings → Extensions.
3
Navigate to CiviCRM → Elections.
4
Fatal error is thrown. Page does not load.
Root cause
The extension uses .entityType.php schema files (in /schema/) rather than traditional auto_install.sql files. CiviCRM 6.x should auto-generate and apply the schema from these definitions on install, but the allow_checksum_access field defined in Election.entityType.php was not applied to the civicrm_election table. All other tables and columns were created correctly. There are no upgrade_X_X_X.php migration files in the extension to handle adding this column to existing installs.
Workaround (confirmed working)
1
SSH into the server and run via WP-CLI:
sudo wp --path=/opt/bitnami/wordpress civicrm db query
"ALTER TABLE civicrm_election ADD COLUMN allow_checksum_access tinyint(4) DEFAULT 0;"

sudo wp --path=/opt/bitnami/wordpress civicrm db query
"ALTER TABLE log_civicrm_election ADD COLUMN allow_checksum_access tinyint(4) DEFAULT 0;"
2
Clear the CiviCRM cache:
sudo wp --path=/opt/bitnami/wordpress civicrm cache-clear
3
Elections page loads correctly. Existing election data is preserved.
Expected behavior
All columns defined in Election.entityType.php — including allow_checksum_access — should be created in civicrm_election and log_civicrm_election on fresh install. Future schema additions should include an upgrade_X_X_X.php migration file so existing installations are updated automatically without manual SQL intervention.
Reported by IAFST · iafst.org · CiviCRM/WordPress on Amazon AWS (Bitnami)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions