Closed (fixed)
Project:
Glossify
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2025 at 10:10 UTC
Updated:
23 Sep 2025 at 09:39 UTC
Jump to comment: Most recent
The node title "Abc Xyz+" does not get replaced as term, as it seems. Could we have a test to check that and try fixing, if possible?
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #5
grevil commentedOk this should do the trick! The problem was, that we use a word boundary at the end of the regex pattern ("/b"). Since "+" isn't considered a word character, the pattern can not match Abc Xyz+.
Drupal probably also allows entities to be named "+Abc Xyz" as well? I guess that will also fail because of the leading "/b". I will provide a test and a fix tommorow.
Comment #6
anybodyThanks @grevil. We have to be careful then, because maybe the change will lead to issues where partial words are replaced, which might be undeserved. Maybe we'll need a setting, if we don''t find a good general solution. Thanks for finding out the reason so far!
Comment #7
anybodyMaybe we should first add an issue to add tests for not breaking partial words. After merging that and updating the fork, I guess they will fail expectedly.
Comment #8
anybodyComment #9
grevil commentedNow that #3538691: Add tests to check, that words partially containing an entity name won't get glossified and fix deprecations is fixed, let's see if the tests still succeed.
Comment #10
grevil commentedNice the test fails now!
Comment #11
anybodyNice! So let's add the 4-options select option for "Partial word match":
Comment #12
grevil commentedI don't think, that is related to this issue, but we can create a follow-up issue for that in the future.
Comment #13
grevil commentedThe current approach should be the option we have to fix this issue.
It will have problems with terms like " test ", "test." or "test," but I don't think it is even possible to save drupal entities having a label with a trailing whitespace? And using "." or "," inside the label is also super uncommon and would have let to a problem before.
Comment #14
grevil commentedRegarding the many tests we have, this fix is fairly "save". I'll merge it.
Comment #16
grevil commented