free tagging and v1.1beta5

Found a bug? Tell us!!
Post Reply
juergen
Regular
Posts: 55
Joined: Tue Jul 04, 2006 2:23 pm
Location: Mayence, Germany
Contact:

free tagging and v1.1beta5

Post by juergen »

Hi,

while editing an article it isn't possible to add tags by clicking one in the "Tagging of entries" area. Nothing happens. Adding tags is possible by enter it manually only.

Greetings, Juergen
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: free tagging and v1.1beta5

Post by garvinhicking »

Hi!

Please check the JS error console in your browser, do you get errors?

Which version of the freetag plugin are you using? There had been errors in older versions of it.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
juergen
Regular
Posts: 55
Joined: Tue Jul 04, 2006 2:23 pm
Location: Mayence, Germany
Contact:

Re: free tagging and v1.1beta5

Post by juergen »

Hi Garvin,
garvinhicking wrote: Please check the JS error console in your browser, do you get errors?
Fehler: freetags[freetag].toLowerCase is not a function
garvinhicking wrote: Which version of the freetag plugin are you using? There had been errors in older versions of it.
Autor: Garvin Hicking, Jonathan Arkell; version: 2.63

:(

best regards, Juergen
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: free tagging and v1.1beta5

Post by garvinhicking »

Hi Juergen!

Which browser are you using? And what is contained in your textarea of freetags when you get this error? It can't be empty, because if it were the code should not fork into the place where 'toLowerCase' is applied...?!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
juergen
Regular
Posts: 55
Joined: Tue Jul 04, 2006 2:23 pm
Location: Mayence, Germany
Contact:

Re: free tagging and v1.1beta5

Post by juergen »

garvinhicking wrote: Which browser are you using?
Firefox 1.5.0.8., Opera 9.0.2
garvinhicking wrote: And what is contained in your textarea of freetags when you get this error? It can't be empty, because if it were the code should not fork into the place where 'toLowerCase' is applied...?!
After clicking a tag link the form scroll / jump down positioning the tag box on the top of the browser. (This behaviour is the same I know from v1.0.) The error message (freetags[freetag].toLowerCase is not a function Line:630) appears immediately and for every following click on a link.
The textarea of freetags are empty! No message appears in the broeser window.
I've tested it with an empty textarea and with manually typed tags. I've switch the configuration option (transform tags to lower case). It doesn't matter.

Juergen
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: free tagging and v1.1beta5

Post by garvinhicking »

Hi!

Does it work with FireFox/IE? That would be a lead for me. :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Brendon K
Regular
Posts: 44
Joined: Thu Feb 23, 2006 10:35 pm
Location: Saratoga Springs, NY, USA
Contact:

Post by Brendon K »

I just installed and tested this on my blog running Serendipity v1.0 and plugin v2.64. I don't mean to intrude, but I was recently looking at phpTagEngine which is a competitor of FreeTag, so I was curious...

Anyway, I tested this both in Firefox v2.0 (sorry, I recently upgraded) and Opera 9.02. The JavaScript worked for me without any errors or notices.

Could there possibly be a JavaScript namespace clash with another plugin currently installed? Did you upgrade to the current version of Serendipity you're running, or did you start with a fresh install?

I'm not saying a problem doesn't exist, but I don't think the blame lies with just the FreeTag plugin
They say, "Practice makes perfect," yet they also say, "Nobody's perfect." I don't get it.
wh1sper
Regular
Posts: 113
Joined: Sat Jan 15, 2005 6:26 pm
Location: Germany
Contact:

Me too

Post by wh1sper »

I've this problem, also.
S9y 1.1 and freetag 2.75 (I tried the newest version out of cvs also)
firefox (iceweasel) 2.01
I'v done a workaround
Original:

Code: Select all

 if (freetags[freetag] && trim(freetags[freetag].toLowerCase()) == addTag.toLowerCase()) {
workaround:

Code: Select all

 if (freetags[freetag] && freetags[freetag] == addTag) {
This helps. But the failure is very strange and exists for months.
meine-erde
Regular
Posts: 8
Joined: Sat Jan 13, 2007 1:52 pm
Location: Potsdam, Germany
Contact:

Post by meine-erde »

The original code looks like this:

Code: Select all

for (freetag in freetags) {
  if (freetags[freetag] && trim(freetags[freetag].toLowerCase()) == addTag.toLowerCase()) {
    inList = true;
  }
}
It seems as if there is a problem in the assignment of freetag in the for-in loop. If I manually check the content of the freetags array everything seems correct, but if I let Firefox work itself through the loop it thows up. So I assume there is a problem in the loop assignment.

If I switch to the classic loop style everythings great. I have no idea why the other code throws an error.

So at the moment I use a workaround which is functionally completely identical to the original code. The code is located in /plugins/serendipity_event_freetag/serendipity_event_freetag.php on line 666 (at least in current Version 2.75 of the Plugin):

Code: Select all

for (var freetag = 0; freetag < freetags.length; freetag++) {
  if (freetags[freetag] && trim(freetags[freetag].toLowerCase()) == addTag.toLowerCase()) {
    inList = true;
  }
}
Et voilà, the error rests in peace.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Great debugging! I understand that fix, and I will commit it, as it should really work more stable. Thanks a lot for reporting this!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply