Page 1 of 1

free tagging and v1.1beta5

Posted: Thu Nov 09, 2006 2:22 pm
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

Re: free tagging and v1.1beta5

Posted: Thu Nov 09, 2006 2:28 pm
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

Re: free tagging and v1.1beta5

Posted: Thu Nov 09, 2006 2:53 pm
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

Re: free tagging and v1.1beta5

Posted: Thu Nov 09, 2006 3:20 pm
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

Re: free tagging and v1.1beta5

Posted: Thu Nov 09, 2006 3:53 pm
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

Re: free tagging and v1.1beta5

Posted: Sat Nov 11, 2006 4:44 pm
by garvinhicking
Hi!

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

Regards,
Garvin

Posted: Tue Nov 14, 2006 2:37 am
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

Me too

Posted: Mon Jan 01, 2007 1:07 pm
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.

Posted: Sat Jan 13, 2007 2:50 pm
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.

Posted: Sat Jan 13, 2007 3:15 pm
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