List Info

Thread: Small bug on tags ?




Small bug on tags ?
user name
2007-12-20 05:16:00
Hi mephistoers,

I think I met a small bug on tag handling, here's what's
happening and
how to reproduce it:
- create a post with a given tag (eg:
"MindMapping")
- create another post with a case variation (eg:
"mindmapping")

When you do so, the second post (and all forthcoming posts
with the
same tag) will be double-tagged with both
"MindMapping" and
"mindmapping".

This is happening on mephisto trunk r3037 with Rails 1.99.0.
So far I
think I'm just going to delete the relevant tag through the
console,
which seems to work fine.

Is it annoying anyone else ?

cheers

Thibaut
--
http://evolvingworker.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


Re: Small bug on tags ?
user name
2007-12-20 22:19:10
Same bug in the current stable release. I haven't run into
it with the
current trunk with Rails 2.0.1, but I haven't been using it
long
enough to know if it still exists there.

On Dec 20, 3:16 am, thibaut <thibaut.barr...gmail.com> wrote:
> Hi mephistoers,
>
> I think I met a small bug on tag handling, here's
what's happening and
> how to reproduce it:
> - create a post with a given tag (eg:
"MindMapping")
> - create another post with a case variation (eg:
"mindmapping")
>
> When you do so, the second post (and all forthcoming
posts with the
> same tag) will be double-tagged with both
"MindMapping" and
> "mindmapping".
>
> This is happening on mephisto trunk r3037 with Rails
1.99.0. So far I
> think I'm just going to delete the relevant tag through
the console,
> which seems to work fine.
>
> Is it annoying anyone else ?
>
> cheers
>
> Thibaut
> --http://evolvingworker.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


Re: Small bug on tags ?
user name
2007-12-21 04:38:15
Yeah that happens. It's annoying. If you delete the tag
entry from the
relevant database it fixes it, but yeah it really freaks out
if you
try to remove the tag using the text field below the post...
and the
'tags' pages that show all pages tagged as something freak
out as
well.

But I'm using the current stable, so maybe that's fixed?

-Justin

On Dec 20, 5:16 am, thibaut <thibaut.barr...gmail.com> wrote:
> Hi mephistoers,
>
> I think I met a small bug on tag handling, here's
what's happening and
> how to reproduce it:
> - create a post with a given tag (eg:
"MindMapping")
> - create another post with a case variation (eg:
"mindmapping")
>
> When you do so, the second post (and all forthcoming
posts with the
> same tag) will be double-tagged with both
"MindMapping" and
> "mindmapping".
>
> This is happening on mephisto trunk r3037 with Rails
1.99.0. So far I
> think I'm just going to delete the relevant tag through
the console,
> which seems to work fine.
>
> Is it annoying anyone else ?
>
> cheers
>
> Thibaut
> --http://evolvingworker.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


Re: Small bug on tags ?
user name
2007-12-22 02:07:28
I've grabbed a copy of the trunk to write a test and
reproduce this. I
noticed that there are both spec tests and test::unit tests.
Are specs
the preferred way of testing under mephisto today ?

cheers

Thibaut
--
http://evolvingworker.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


Re: Small bug on tags ?
country flaguser name
United States
2007-12-22 02:13:28

On Dec 22, 2007, at 12:07 AM, thibaut wrote:

>
> I've grabbed a copy of the trunk to write a test and
reproduce this. I
> noticed that there are both spec tests and test::unit
tests. Are specs
> the preferred way of testing under mephisto today ?
yes indeed!  All tests will eventually be migrated/rewritten
to specs.

Cheers,
Pascal
--
http://blog.nanorails.com

> cheers
>
> Thibaut
> --
> http://evolvingworker.com
> >


--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


Re: Small bug on tags ?
user name
2007-12-22 06:13:08
> yes indeed!  All tests will eventually be
migrated/rewritten to specs.

Thanks ! I'll have a deeper look at the code base and see if
I can
write a patch.

cheers

Thibaut
--
http://evolvingworker.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


Re: Small bug on tags ?
user name
2007-12-23 11:27:05
I've upgraded from r3037 to r3079.

The behaviour is different now: all tags are transformed to
lower-case
(eg: "MindMapping" will become
"mindmapping"), because of a downcase
call inside Tag.parse.

Is it a deliberate choice ?

The temporary good news is that it hides the bug I was
talking about.
I noticed the following trace in MySQL queries:

SELECT * FROM `tags` WHERE (name IN ('mindmapping'))

Under mysql the query will match both
"MindMapping" and "mindmapping"
by default.

cheers

Thibaut
--
http://evolvingworker.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


Re: Small bug on tags ?
user name
2007-12-23 15:13:52
On 12/23/07, thibaut <thibaut.barreregmail.com> wrote:
>
> I've upgraded from r3037 to r3079.
>
> The behaviour is different now: all tags are
transformed to lower-case
> (eg: "MindMapping" will become
"mindmapping"), because of a downcase
> call inside Tag.parse.
>
> Is it a deliberate choice ?

Probably... Perhaps a reason was given with the svn
revision.

> The temporary good news is that it hides the bug I was
talking about.
> I noticed the following trace in MySQL queries:
>
> SELECT * FROM `tags` WHERE (name IN ('mindmapping'))
>
> Under mysql the query will match both
"MindMapping" and "mindmapping"
> by default.

Yup, mysql kinda sucks.  That makes no sense to me.

-- 
Rick Olson
http://lighthouseapp.com

http://weblog.techno-
weenie.net
http://mephistoblog.com

--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


Re: Small bug on tags ?
user name
2007-12-23 16:42:41
In case it's helpful to someone, here's what I found:
- I think the case behaviour changed at revision 3055
("allow space
AND comma delimited tags").
- MySQL default collation is latin1_swedish_ci (case
insensitive),
hence the behaviour.
- other databases can act the same way (Oracle, SQLServer
and more)
depending on their configuration.
- the way I understood it: Postgres SQL cannot exhibit this
behaviour
because its searches are case sensitive (unless ILIKE is
used).

Best bet for the future could be to insulate the code from
db specific
stuff (like done by r3055).

If you're using MySQL and wish to upgrade after r3055, you
may have to
use the console to fix tags with caps in their names, like I
did.

hope this helps!

Thibaut
--
http://evolvingworker.com
--~--~---------~--~----~------------~-------~--~----~
Mephisto: http://mephistoblog.com |
Mephisto Help: http://mephisto.stikipad
.com

To post to this group, send email to MephistoBloggooglegroups.com
To unsubscribe from this group, send email to
MephistoBlog-unsubscribegooglegroups.com
For more options, visit this group at http
://groups-beta.google.com/group/MephistoBlog
-~----------~----~----~----~------~----~------~--~---


[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )