Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 930
    • Issues 930
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #1564

Closed
Open
Opened Jan 30, 2020 by scardinius@scardiniusDeveloper

Exception Malformed temp table category on New A/B Test

Overview

When I create new A/B Test I receive error in session status Exception Malformed temp table

Reproduction steps

  1. Create any new A/B Test
  2. on final step click on Submit Mailing
  3. Error Exception Malformed temp table is displayed

Current behaviour

There is a problem with length of $category, which for this case is a variable

// CRM/Mailing/BAO/Recipients.php
->setCategory('srcmailing' . $sourceMailingId)

For mailing_id greater than 99 (sic!) the generated category is invalid due to this check (CATEGORY_LENGTH is equal only 12):

// CRM/Utils/SQL/TempTable.php
public function setCategory($category) {
  if ($category && !preg_match(self::CATEGORY_REGEXP, $category) || strlen($category) > self::CATEGORY_LENGTH) {
    CRM_Core_Error::backtrace();
    throw new \RuntimeException("Malformed temp table category");
  }
  $this->category = $category;
  return $this;
}

Expected behaviour

We should create category for max of INT(10) UNSIGNED, so it should be srcmailing4294967295char(20) or shorter prefix. Probably in both situation we need to increase self::CATEGORY_LENGTH

Environment information

  • CiviCRM: 5.21.1
Edited Jan 30, 2020 by scardinius
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
5.22.0
Milestone
5.22.0
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#1564