Loading...
 
Skip to main content

Newsletter unsubscribe link always fails — inputConfiguration filters hash as 'bool'

Status
Closed
Subject
Newsletter unsubscribe link always fails — inputConfiguration filters hash as 'bool'
Version
29.x
Category
  • Error
Feature
Newsletters
Resolution status
Fixed or Solved
Submitted by
Bernard Sfez / Tiki Specialist
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

Clicking the unsubscribe link in a newsletter email always results in the error "Your request to unsubscribe failed", even though the subscription record and code exist in the database. The subscription is never removed.

Tiki 29.x (confirmed). Likely affects all versions where the $inputConfiguration array is present with this filter.

Steps to Reproduce

  1. Enable the Newsletters feature
  2. Create a newsletter and add a subscriber (email-based, non-user)
  3. Send a newsletter edition
  4. Open the received email and click the unsubscribe link, e.g.:
  5. https://example.com/tiki-newsletters.php?unsubscribe=bfaea1b540a27940684c99854449549c
  6. The page displays: "Your request to unsubscribe failed"
  7. The subscription record remains in tiki_newsletter_subscriptions — nothing was deleted


In tiki-newsletters.php, the $inputConfiguration array declares the unsubscribe parameter with a 'bool' filter:

Copy to clipboard
$inputConfiguration = [ [ 'staticKeyFilters' => [ 'unsubscribe' => 'bool', //post // ... ], ], ];


There is a legal concern with so I will commit a fix right away.
Non-functional unsubscribe links may violate anti-spam regulations (CAN-SPAM, GDPR)

Solution

Proposed Fix
Change the input filter from 'bool' to 'word' so the MD5 hash string is preserved:

Copy to clipboard
// Before (broken): 'unsubscribe' => 'bool', //post // After (fixed): 'unsubscribe' => 'word', //post
Workaround
Importance
7
Easy to solve?
7
Priority
49
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8957
Created
Tuesday 24 March, 2026 08:43:25 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Wednesday 25 March, 2026 09:36:27 UTC


Show PHP error messages