Blog Sections Open

Fixing the xmail Redeclare Error in Legacy eForm Setups

A well-known legacy failure in older Evolution CMS projects is the fatal error: Fatal error: Cannot redeclare xmail() This usually appears when two different mail-related files define the same helper function. In the ori

A well-known legacy failure in older Evolution CMS projects is the fatal error:

Fatal error: Cannot redeclare xmail()

This usually appears when two different mail-related files define the same helper function. In the original case, one declaration came from eForm and another from the manager mail layer.

Why It Happens

  • older builds bundled overlapping mail helpers
  • custom eForm copies were patched independently
  • updating one part of the stack without the others exposed the conflict

What to Check

  1. which file defines xmail() first
  2. whether eForm was modified locally
  3. whether the project mixes files from different Evolution builds

The safest fix is not to comment out one function blindly, but to align the mail-related files to one compatible set. This is a version hygiene problem more than a form problem.

Newer post

Configuring HTTP and HTTPS Correctly in Evolution CMS

A practical guide to MODX_SITE_URL, manager URLs, and SSL transitions when a legacy Evolution site moves from HTTP to HTTPS.

Older post

Fixing KCFinder Safe Mode Errors on Shared Hosting

How to interpret the old KCFinder “safe_mode” error and why .htaccess alone is often not enough to fix it on shared hosts.