Tags:
create new tag
, view all tags

Question

I have installed the ActionTrackerPlugin and all of the required dependencies. The problem I am having is when I edit an action item and click on the icon to display a pop up calendar, nothing happens. I have checked the permissions of each of the unzipped files and they appear correct. I have run the ActionTrackerPlugin installation script and it shows all the dependencies are installed. I have tried this under Mozilla and Internet explorer and both show the same behavior. I have created a sandbox entry with the code from the JSCalendarContrib page and the button on this page does display a pop up calendar. I have gone through all the preferences (which I have not changed from the defaults) and they look correct. I have run the testenv script for twiki and everything there looks appropriate. I am at a loss on what else to investigate and would appreciate any suggestions.

One more thing to note is that the pop up calendar did work on my first setup of this plugin under Windows/apache/cygwin. It was when I setup our final server under debian that the functionality never worked.

Environment

TWiki version: TWikiBetaRelease2004x10x30
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Debian, kernel 2.6.8-1-386
Web server: Apache 1.3.33
Perl version: v5.8.4
Client OS: Windows 2000 SP4 (latest fixes as of 1/05)
Web Browser: Mozilla 1.7.5, Internet Explorer 6.0.2.2800.1106
Categories: Plugins

-- RickMach - 11 Jan 2005

Answer

My best guess is that for some reason it can't get all the requisite .js files from the server. Check your apache log for messages.

-- CrawfordCurrie - 17 Jan 2005

I have the same issue on both AIX 5.1 (with apache 1.3) and SuSE SLES8 (apache 1.3 also). The JS calendar works fine with the EditTablePlugin however so I know permissions are not an issue. Any other ideas Crawford?

-- CharlesJohnson - 20 Jan 2005

I have the same issue on RedHat 7.2 and apache 1.3.26. No messages in the apache logs. Any ideas appreciated.

-- SteveJonesST - 25 Jan 2005

It's almost certainly unable to get the .js files. Look at the source of a page with the calendar button, and try accessing the URLs it usess for the various bits of .js, either directly from the browser or using wget from the command line. The EditTablePlugin doesn't use the same files as the Contrib, I'm afraid.

-- CrawfordCurrie - 16 Feb 2005

Crawford, I'm sure you're right. For me $calendarIncludes doesn't seem to be being expanded, so I just get this in my html source :

<!-- INCLUDEJSCALENDAR -->

With none of the expected link/script directives following it.

Any ideas why these might not be getting expanded ?

-- SteveJonesST - 17 Feb 2005

Hmmmm. The ActionTrackerPlugin.pm contains the following line in the commonTagsHandler:

$_[0] =~ s/<!-- INCLUDEJSCALENDAR -->/$calendarIncludes/;
Now, there are three possible reasons why this line doesn't work.
  1. If it isn't there, and you have an old version of the ActionTrackerPlugin (I have 2.021)
  2. If there is more that one <!-- INCLUDEJSCALENDAR line in the file, in which case I would expect you to have seen the JS further up the file in view source.
  3. The commonTagsHandler isn't getting called, which would be the case if the ActionTrackerPlugin installation was incorrect in some way. I would expect error messages in the apache log and/or data/warning.txt in this event.

-- CrawfordCurrie - 20 Feb 2005

Hi Crawford. Thanks so far. In response to your points :

  1. I've just upgraded from 2.020 to 2.021, and I have the same behaviour - no popup for the calendar.
  2. There is only one INCLUDEJSCALENDAR in the edit action source html.
  3. I have no messages in warnings.txt or the apache logs for ActionTrackerPlugin.

Clearly the substitution of INCLUDEJSCALENDAR in edit.action.tmpl is not taking place for me. Do you have any ideas how I can debug this further ?

Many thanks for the clues you've given so far.

-- SteveJonesST - 21 Feb 2005

Thank you for taking the time to research it.

The only thing I can suggest is to put print statements around the line in question. Something like

print STDERR "Got here ",($_[0] =~ m/INCLUDEJS/);

will get printed to the apache error log. You may be able to narrow it down from there.

-- CrawfordCurrie - 21 Feb 2005

OK, I think we're getting somewhere. Inside the first line of sub commonTagsHandler, is a return, if ACTION is not matched, like this :

return unless ( $_[0] =~ m/%ACTION.*{.*}%/o );

When I edit an action, this doesn't seem to match anything, and commonTagsHandler returns immediately.

If I comment out this return, then the INCLUDEJS substitution takes place, and the calendar pops up as you'd expect.

Why is the return there, and is it safe to comment it out ? I'm nervous about about my abuse of a live installation with limited knowledge of the code.

One slightly surprising thing is that the comments below the return suggest that the return shouldn't be executed first.

-- SteveJonesST - 2012-05-28

The return is purely an optimisation, and is intended to block any further processing on a page that does not contain a %ACTION. I don;t think it should ever trigger on an action edit (there should always be a %ACTION in $_[0]). I don;t have time to debug it. Rather than commenting it out, simply move that line down below the calendar handling, just before the if( !$initialised ). If that works I'll run the unit tests and update the release zip.

-- CrawfordCurrie - 22 Feb 2005

Moving the return to just above the if(!$initialised ) doesn't help. Moving it to just below, i.e. the line above # Format actions in the topic. works fine.

I really appreciate your help, Crawford.

-- SteveJonesST - 2012-05-28

Hi,

I have the same problem with Apache + mod_perl on Windows XP. I am also using version 2.021 of ActionTrackerPlugin. I have put some debug code to see the content of $_[0] when searching for ACTION, and when i click on a edit link of an action, all i get in $_[0] is the attached file http://www.twiki.org/p/pub/Support/ActionTrackerJSCalendarNotWorking/_0.txt

As you can see the regex function can never find an ACTION tag...

I also had another problem, the ACTIONSEARCH did not work. After some debugging i found out that using the search:

%SEARCH{ "%ACTION" }% 
didn't find anything while

%SEARCH{ "ACTION" }% 
did find all the pages... Any idea why there is this behaviour? How does the '%' interfere with the search?

Thanx

-- AlexandreHauser - 09 Mar 2005

I think you are right, I just haven't had a chance to update the zip yet.

What is wrong with ACTIONSEARCH? Why are you using SEARCH instead?

-- CrawfordCurrie - 09 Mar 2005

Well, i had no results with ACTIONSEARCH on the page ActionTrackerPlugin, though the actions were displayed correctly. After looking at the code in ActionSet.pm, i found out that when taking the '%' out of the search, the search worked correctly. The change (sofar) has been at ActionSet.pm/Line 288:

my $grep = `$cmd -H $q%ACTION\\{.*\\}%$q $1`;
->
my $grep = `$cmd -H ${q}ACTION{.*}${q} $1`;
and then the ActionSearch worked (I took out the '\\' as it doesn't seem required. But if i put back the '%' it does not work anymore.

To see where the error came from, i tried the search through a dos command and it works correctly with or without the '%'.

Then i thought maybe it was Twiki who was confused by the '%' so i tried with the SEARCH to see if it found the action with '%' or without, and well it doesn't find the ACTION with the '%'.

Any idea why the '%ACTION' couldn't find any ACTION?

The fix of moving the return below initialized works for me too. Thanks.

-- AlexandreHauser - 09 Mar 2005

You're on a DOS box? Chances are you haven't set your cmdQuote correctly. DOS uses % in the same way as most Unix shells use $, to introduce a variable.

-- CrawfordCurrie - 10 Mar 2005

I am on Windows XP. My cmdQuote is "\"". That should be correct, no?

-- AlexandreHauser - 11 Mar 2005

Make sure it is set that way in the ActionTrackerConfig.pm. But this should only be a problem if you are using ActiveState perl. You can always try editing ActionSet.pm and replacing the $q with the actual quote.

-- CrawfordCurrie - 16 Mar 2005

Alexandre, I've just had the very same problem as you (running mod_perl, Cygwin and ActiveState with PERL5SHELL set to "bash -c"): any search containing a percent (%) would find nothing at all. I confirm that it's because you're using double quotes... To fix this, you need to go into your TWiki.cfg file and comment the line (around 200 in mine) saying: $cmdQuote = "\"" if( $OS eq "WINDOWS" ); Or even delete it. It will then use single quotes around search expressions, and it will work like a charm. smile

-- PascalDavoust - 24 Mar 2005

By the way, it looks like commonTagsHandler is called twice: once for the template, and one time for the topic text itself. And since the template doesn't contain any item, it just returns without doing anything, while it should be substituting INCLUDEJSCALENDAR instead. I guess the optimization need revising (I'm sorry, I'm new to Perl and currently not skilled enough to do the fix and contribute myslef :().

-- PascalDavoust - 25 Mar 2005

I just uploaded a version with the JSCalendar fix in. Yes, the commonTagsHandler is called twice, you are seeing the cause of the problem.

-- CrawfordCurrie - 26 Mar 2005

 
Topic attachments
I Attachment Action Size Date Who Comment
Texttxt _0.txt manage 4.5 K 2005-03-09 - 13:10 AlexandreHauser Debug file from Twiki. The field $_[0] shows the value of $_[0] when checking for the ACTION tag in ActionTrackerPlugin.pm
Topic revision: r21 - 2005-03-26 - CrawfordCurrie
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.