not converting to lowercase
Posted: 19 April 2008 10:30 AM   [ Ignore ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  119
Joined  2005-09-13

Hey guys,

My client is using Tag and unfortunately it doesn’t seem to be converting to lowercase, even though we have that option on. In fact (just checking again), whenever I set that to No in the preferences, then go to Manage Tags, then back to Preferences, it’s set back to Yes! What’s up there?

But most importantly my client has been inputing both upper and lowercase tags and it seems to treat each one as separate tags all together. Then we’re unable to delete those either one of those tags from neither the SAEF nor the CP Edit screen (delete them from the textarea, click update, go back to edit and they’re back).

Is this a known bug? I’ve definitely seen this before on another site using Tag, but can’t remember how I fixed it.

Profile
 
 
Posted: 21 April 2008 05:55 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3349
Joined  2006-10-18

Wonder Monkey,

Which version of Tag are you using? And which version of ExpressionEngine are you using? smile

 Signature 
Profile
 
 
Posted: 22 April 2008 05:24 PM   [ Ignore ]   [ # 2 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  119
Joined  2005-09-13

We’re using 1.0.9 and 1.6.2.

The client knows they have to upgrade but we can’t due to production reasons for now.

Profile
 
 
Posted: 23 April 2008 06:43 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3349
Joined  2006-10-18

Wonder Monkey,

I would highly recommend updating Tag to 2.1.1 at whatever costs.
I hate to admit it, but there was some pretty nasty, disastrous bugs in 2.0.9.

EDIT: Tag 1.0.9, or 2.0.9?

 Signature 
Profile
 
 
Posted: 07 August 2008 05:10 PM   [ Ignore ]   [ # 4 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  119
Joined  2005-09-13

Hi Pieman.
Finally, four months later, we’re dealing with this.

So there’s still a major issue with 2.1.1 (we’re on 1.6.4 too)

Scenario with convert to lowercase OFF:

- enter ‘Solspace Web’ in a tag form (I’m using a SAEF but I’ve replicated this in the tag tab of the CP)
- save
- change that tag to ’solspace web’, save
You then have both ‘Solspace Web’ and ‘solspace web’.
- delete either of them and you still get both everytime until you delete all tags, save and start again. However if you go back to entering either one of those tags without deleting them from the Manage Tags screen you’ll end up back in duplicate hell. smile

Profile
 
 
Posted: 08 August 2008 10:37 AM   [ Ignore ]   [ # 5 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  119
Joined  2005-09-13

Just going through mod.tag.php here and noticed that on line 2509 that it’s checking to see if we are converting to lowercase, and since it’s not in this case the SQL query is checking for that tag to see if it’s already existing for that entry_id (in order to update the date, right?). But for case sensitive searches, as this one should be (I believe), the tag_name field should be binary, otherwise mysql will find either solspace web and Solspace Web.

Um, right? I know I know, a little bit of knowledge… dangerous here.

Profile
 
 
Posted: 10 August 2008 12:43 PM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3349
Joined  2006-10-18

Thank you Wonder Monkey smile

This has recently become a known issue. I’ve also successfuly duplicated it smile

I will queue this one up for the next release wink

 Signature 
Profile
 
 
Posted: 11 August 2008 02:51 PM   [ Ignore ]   [ # 7 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  119
Joined  2005-09-13

Hey Pieman,
I had another PHP developer look at this issue and this is what he came up with

The module let create or delete tags but not edit them. When we change the case, it add the another entry but don’t delete the old one since it’s not seen as the same.
A way to correct this would be to delete all tags for the entry then re-add the entered tags.
Another way would be to detect case change, then edit the tag_name with the new value.
Also, there could be a way to do it in the _clean() function, i.e. selecting tags that have the same spelling and deleting the ones that don’t have the same case than the new tag.
A fourth way to do it would be to detect other tags then unlink them from the entry, then run the _clean() method.

Profile
 
 
Posted: 11 August 2008 03:01 PM   [ Ignore ]   [ # 8 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3349
Joined  2006-10-18

Wonder Monkey,

Thank you… I’ll pass this along smile

 Signature 
Profile
 
 
Posted: 17 October 2008 10:18 AM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3349
Joined  2006-10-18

This is now fixed with the new version of Tag 2.5 smile
http://www.solspace.com/forums/viewthread/661/

 Signature 
Profile