Description of the Bug:
The Word Expansion feature in Invision Board Community v5 Beta 10 exhibits incorrect matching behavior when multiple word expansions share similar prefixes. The issue arises when word expansions such as:
- PCI
- PCIe
- PCI-DSS
- PCI-X
are added to the Word Expansion list. The system does not differentiate between these variations correctly and applies expansions incorrectly when terms with similar prefixes are used in posts or comments.
Steps to Reproduce:
- Navigate to the Admin Control Panel (ACP).
- Go to System > Settings > Posting & Editor > Word Expansions.
-
Add the following word expansions:
- PCI
- PCIe
- PCI-DSS
- PCI-X
- Save the changes.
- Create a new forum post or comment with the text: "This server is PCI-DSS compliant and uses a PCIe SSD, a PCI network card and a PCI-X raid card."
- Observe the applied word expansions in the post.
Expected Behavior:
Each word expansion should apply only to the exact matching term in the text. For example:
- PCI should expand only when the standalone term "PCI" is used.
- PCIe should expand only when the term "PCIe" is used.
- PCI-DSS should expand only when the term "PCI-DSS" is used.
- PCI-X should expand only when the term "PCI-X" is used.
Actual Behavior:
The word expansion logic applies expansions inconsistently. For example:
- "PCIe" triggers the "PCIe" expansion.
- "PCI-DSS" triggers "PCI" expansions.
- "PCI-X" triggers the "PCI" expansion.
- "PCI" triggers the "PCI" expansion.
This incorrect matching behavior causes confusion and unintended text replacements.
Impact:
Users experience incorrect text replacements in their forum posts. This can lead to confusion, especially in technical forums where precise terminology is crucial. It diminishes the usability of the Word Expansion feature.
Suggested Fix:
Update the Word Expansion matching algorithm to ensure it matches whole words or specific phrases accurately. Implement a stricter matching mechanism that differentiates between exact terms and terms with similar prefixes.
Environment:
- Platform: Linux (Ubuntu 24.04)
- Web Server: nGinX
- PHP Version: 8.2
- Database: MySQL 8.0
- Browser: Microsoft Edge
Attachments:
Bug Report Update
Title: [Beta 10] Word Expansion Matching (Additional Findings)
Description:
Following my initial bug report regarding the Word Expansion feature in IC v5 Beta 10, I have discovered that deleting and re-adding the affected word expansion "PCI" temporarily resolves the issue. Once re-added, the system correctly matches each term, such as "PCI", "PCIe", "PCI-DSS", and "PCI-X", without triggering incorrect expansions.
This behavior suggests a potential issue with how word expansions are initially cached or indexed.
Steps to Verify Fix:
- Delete the "PCI" expansion from the Word Expansion list.
- Re-add "PCI" with the same settings.
- Retest by editing the forum post created with the terms specified.
- Observe that the system now matches each term correctly.
Impact:
While this workaround solves the issue temporarily, it may confuse users who are unaware of the need to manually reset word expansions.
Suggested Fix:
I have no idea... Didn't look 🙂
Reported by: Jessica
Date: January 12, 2025
Recommended Comments