mirror of
https://github.com/SuiteCRM/SuiteCRM.git
synced 2026-03-02 19:16:58 -05:00
Workflow module's conditions don't save if the entry is just a space (or trimmable character): since 7.14.6 #5357
Labels
No labels
Area: API
Area: Campaigns
Area: Cases
Area: Clean Up
Area: Clean Up: Performance
Area: Dashlets
Area: Databases
Area: Developer Tools
Area: Elasticsearch
Area: Elasticsearch
Area: Emails
Area: Emails:Campaigns
Area: Emails:Cases
Area: Emails:Compose
Area: Emails:Config
Area: Emails:Templates
Area: Environment
Area: Installation
Area: Language
Area: Mobile
Area: Module
Area: PDFs
Area: PHP8
Area: Reports
Area: Studio
Area: Styling
Area: Upgrading
Area: Workflow
Area:Activity Stream
Area:Calls
Area:Import
Area:Projects
Area:Search
Area:Surveys
Area:Themes
Area:Users
Branch:Hotfix
Good First Issue
Hacktoberfest
Help Wanted
PR:Community Contribution
PR:Type:Enhancement
Priority:Critical
Priority:Important
Priority:Moderate
Severity: Major
Severity: Minor
Severity: Moderate
Status: Requires Code Review
Status: Requires Updates
Status: Stale
Status: Team Investigating
Status:Assessed
Status:Fix Proposed
Status:Needs Assessed
Status:Requires Automated Tests
Type: Bug
Type:Deprecated
Type:Discussion
Type:Duplicate
Type:Invalid
Type:Question
Type:Suggestion
Type:Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SuiteCRM-SuiteCRM#5357
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DJUserkent on GitHub (Jan 5, 2026).
Issue
The bug means that any condition field that contains only a space (or any other character removed by PHP's 'trim') - is not saved to the database on save.
So it is no longer possible to do things like:
Root cause - 7.14.6 added a default 'trim' to every text field in all modules: in the 'cleanBean' function in data/SugarBean.php
Tested on 7.15.0 - also fails
Possible Fix
The proven fix is to remove the lines added in data/SugarBean.php; that was added in Suite 7.14.6:
// Trim name & varchar type values on save when the value is not null if (isset($def['type']) && in_array($def['type'], ['name', 'varchar']) && !is_null($this->$key ?? null)) { $this->$key = trim($this->$key); }Steps to Reproduce the Issue
Context
No response
Version
7.14.6 and 7.15.0
What browser are you currently using?
Chrome
Browser Version
No response
Environment Information
PHP 8.2 MariaDB
Operating System and Version
Ubuntu 24