Hi,
when I try to add new terms for e.g 1234567890, after saving the node, it will always truncate the first 2 and last 2 character of the terms and become 345678 only.
can always reproduce no matter what I key in.
Hope someone can help, great module tho..
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | autocomplete_deluxe-fix_truncated_terms-1754164-16.patch | 994 bytes | rooby |
| #11 | autocomplete_deluxe-fix-truncate-term-names-1754164-11.patch | 1.14 KB | marioangulo |
Comments
Comment #1
dusov commentedWhen adding any term new or exist
Reason this code
autocomplete_deluxe.module line 302
Comment #2
maxchock commentedwhat is the point of this code? any reason remove the string before knowing whether is it quotes or double quotes?
Comment #3
steven.wichers commentedI created a patch with a temporary workaround.
Comment #4
Fidelix commentedThe module is totally unusable without this.
Should be critical, but I'm setting it to major because I'm not sure if it applies to terms as well, or just nodes.
Comment #5
sepgil commentedIt removes the double quotes generated by multiple widget. Since the single widget doesn't uses double quotes to wrap the values, it will truncate the value itself.
Anyway, I've fixed the bug and the single widget should now work properly.
Comment #6
sepgil commentedComment #8
DeNelo commentedI applied the patch in #3. However, I have two ADX fields (X and Y) in the node type. Completing X and leaving Y empty creates a new taxonomy term in the vocabulary of Y called " (one double quotes).
Editing and saving the node, and still not entering anything for term Y, creates a new term: """ (three double quotes). I have not gone on from there, but there is a pattern...
Comment #9
desierto commentedA fix (maybe the patch in #3, which appears to work) needs to be put in Beta. The module is not useful otherwise... worse than that, it truncates your terms as you edit nodes. If you edit a node multiple times it will even create multiple terms you didn't have before, each with 2 characters less in the beginning and end then the previous version.
Comment #10
4kant commented#3 worked for me. Thanks!
Comment #11
marioangulo commentedAdded on to the fix posted on comment #3. My fix checks if the field is using the multiple type attribute to properly truncate from that field only on not the single field type.
Also I believe #3 had a typo on its regex check with that comma added.
Comment #12
marioangulo commentedRecreated my patch to just only perform the check if it's a multiple field before truncating. The regex check above didn't capture all situations and was creating terms that were blank or just containing quotations when saving nodes.
Comment #13
rooby commentedThis is a pretty nasty bug.
Re #12:
Missing space after if keyword and extra blank line.
Trailing whitespace.
Also attached is a version for 7.x-2.0-beta2, for anyone who wants that.
Comment #14
desierto commentedThis bug is still not fixed in the main beta release even though several releases have come out since this serious bug was identified. Can the maintainer please roll this patch (or a varient) into the main release. This is really becoming annoying to have to patch every release manually.
Comment #15
rsvelko commented+1 for wraooing into an if statement.
Also some smart trimming of quotes instead of substr would be way better.
Will post a a patch in a few hours.
Comment #16
rooby commentedHere is a new reroll for latest 7.x-2.x-dev.
It also addresses the minor issues mentioned in #13.
Comment #17
neograph734Thanks rooby, you saved my day.
Comment #18
LNakamura commentedI no longer see this problem with the current 7.x-2.x dev release - if anyone does still see it, let me know and I'll reopen this issue.
Thanks!