Skip to content

Installation Guide

Andreas Michael edited this page Nov 30, 2026 · 2 revisions

Installation Guide

This guide details the steps to install and enable the ESN Membership Manager module on your Drupal website.

Prerequisites

Before installing, ensure your environment meets the following requirements:

  • Drupal: Version 10.3 or 11 (^10.3 || ^11).
  • PHP: Version 8.3 or higher (^8.3).
  • PHP Extensions: gd, openssl, and simplexml.
  • Composer: Required for managing dependencies.
  • Access: Administrator access to the Drupal site and SSH/Terminal access to the server.
  • Stripe Account: Required for ESNcard payment processing.

Required Dependencies

When installing via Composer, the following dependencies are resolved automatically:

  • Omnia (^1.7): Shared foundation providing core settings, email handling, entity base classes, and shared Google/Apple/Stripe service integrations.
  • ESN Accounts API (^1.1): Used for organisation/section data and automated ESNer status verification.
  • TCPDF (^6.11): Used to generate printable ESNcard face-photo PDF sheets.
  • Drupal Contrib Modules: views_bulk_operations and simple_oauth (for the mobile Scanner app).

Installation Steps

1. Configure Composer Repositories

Ensure your root composer.json includes the Drupal and ESN Composer repositories:

"repositories": {
  "drupal": {
    "type": "composer",
    "url": "https://packages.drupal.org/8"
  },
  "esn": {
    "type": "composer",
    "url": "https://packages.esn.org"
  }
}

2. Download the Module

Method A: Using Composer (Recommended)

This is the preferred method as it automatically handles all PHP and Drupal dependencies and integrates with your site's autoloader.

Run the following command from your Drupal project root:

composer require esn-cy/esn-membership-manager

Method B: Manual Installation (Git)

If you prefer to manage the code manually:

  1. Navigate to your Drupal project's modules directory:
    cd /path/to/your/drupal/web/modules/custom
  2. Clone the repository:
    git clone https://github.com/esn-cy/esn-membership-manager.git esn_membership_manager
  3. Install dependencies manually within the module folder:
    cd esn_membership_manager && composer install

3. Enable the Module

You can enable the module using Drush (recommended) or the Drupal Administration UI.

Using Drush:

drush en esn_membership_manager -y

Using the UI:

  1. Log in to your Drupal site as an administrator.
  2. Navigate to Extend (/admin/modules).
  3. Search for "ESN Membership Manager".
  4. Check the box and click Install.

Note

During installation, the module automatically:

  • Creates the protected private storage directory (../../private/esn_membership_manager_storage) with a restrictive > .htaccess file.
  • Creates the ESN Membership Manager Administrator role (esn_membership_manager_admin).
  • Registers the OAuth2 scope (omnia_scanner_esn_membership_manager / esn_scanner) for the Scanner app.

Post-Installation Configuration

Once the module is enabled, you must configure both Omnia and ESN Membership Manager before it can be used.

1. Omnia Settings (Required First)

Shared credentials—such as your Organisation Name, Logo, Stripe Secret Key, Google Service Account JSON, Google Wallet Issuer ID, and Apple Team ID—are managed centrally in Omnia Settings. Configure these before enabling the corresponding integrations in ESN Membership Manager.

2. Permissions

Assign the appropriate permissions to your user roles (e.g., Administrator, Membership Officer, OC Members).

3. General Settings

Configure the basic module settings, including feature switches, Pass Scheme Name, email sender, Administrator Email Address, and Guest Pass limits.

  • Path: /admin/config/system/esn-membership-manager
  • 👉 See General Settings for the full configuration guide.

4. Integrations (Stripe Required)

The module requires Stripe to be configured for payment processing. Other integrations (Didit, Weeztix, Google Sheets, Google Wallet, Apple Wallet, Google/Apple Authentication) are optional.

5. Cron Setup

Ensure Drupal Cron runs regularly (e.g., daily) so the built-in GDPR Retention Cron automatically purges expired documents and anonymises old applications.

Troubleshooting

"Class not found" Errors

If you encounter errors related to missing classes (e.g., Omnia, Stripe, TCPDF, or Google libraries), ensure you have run composer install from your Drupal project root and cleared Drupal's cache (drush cr).

Private Storage Directory Errors

Ensure the web server user has write permissions to the parent directory of your Drupal web root so ../../private/esn_membership_manager_storage can be created and written to.

Database Updates

After updating the module code in the future, always run database updates and clear caches to apply any schema or entity changes:

drush updb -y
drush cr

Clone this wiki locally