• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item2525: TablePlugin produces bad links for sorting when using "short" URLs

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TablePlugin Normal Closed   patch 4.3.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Sorting links for rendered table for certain URLs is wrong.

Specifically, I use:

http://wiki.company.com/Main/UserList

The sort link is then:

http://wiki.company.com/Main/UserList/Main/UserList?sortcol=0;table=1;up=0#sorted_table

A solution: Plugins/TablePlugin/Core.pm line 577:

$url = $cgi->url . $cgi->path_info() . '?' . $plist;

should be:

$url = $cgi->url(-path_info=>1) . '?' . $plist;

(It would appear that url and path_info could overlap in this case.)


Item2380 looks like it might be related to this (same symptom, web/topic names doubled up).

(I wonder if your fix would work in that case also, instead of the hack - will try it out).

Anybody aware if something changed recently with cgi/query?

-- SP

I'm having troubles reproducing this locally :-/

Jade, could you report the exact versions of the GGI libraries you use? (They are listed in configure under CGI setup).

Do you still have the problem if you use TWiki:Plugins.CpanContrib? (The cpan modules shipped with this takes precedence over locally installed modules).

(I'm re-prioritizing this as Normal, it is not a release blocker).

-- SP

Required Perl modules    Error   0.15    File::Copy   2.08    File::Spec   3.17    CGI   3.20    CGI::Carp   1.29    Algorithm::Diff   1.1901    FileHandle   2.01    Optional Perl Modules    CGI::Cookie   1.27    Digest::SHA1   2.07    Text::Diff   0.35    CGI::Session   4.11    Net::SMTP   2.29    MIME::Base64   3.07    POSIX   1.08    Digest::MD5   2.36    Locale::Maketext::Lexicon   0.49    Encode   2.01 
-- TWiki:Main.JadeCravy

Unable to reproduce this in current SVN code, closing item.

-- SP

I'm re-opening this bug report since I think the reporter left out one crucial bit of information: they were using TWiki:Codev.ShorterURLs (as evidenced by the very first link they list above). I suspect this is the same problem as described in TWiki:Support.TablePluginAndShorterUrlsConflict.

I'm observing the exact same problem on a site that uses url rewriting and would be glad to help find a solution.

-- LB

TablePlugin has seen a lot of refactoring lately, would be good to have a confirmation that this issue still exists in the latest SVN revision.

-- TWiki:Main.SteffenPoulsen - 22 Dec 2007

I am seeing this on Wiki-4.1.2, Sat, 03 Mar 2007, build 13046 I fixed this on line 924 of TablePlugin/Core.pm:

handler() $url = $cgi->url . $cgi->path_info() . '?' . $plist; to $url = $cgi->url . '?' . $plist;

This is using the shorter url stuff as well as apache redirects to shorten further

-- TWiki:Main.AntonPiatek - 24 Jan 2008

Just upgraded to 4.2 and had to fix it as well - line 1695

-- TWiki:Main.AntonPiatek - 11 Feb 2008

I don't see any problem with short urls and table sort. I am using

# Shorter URLs
ScriptAlias /bin "/var/www/html/twiki/bin"
Alias /pub "/var/www/html/twiki/pub"
Alias / "/var/www/html/twiki/bin/view/"

Is this problem related to RewriteEngine?

-- TWiki:Main.ArthurClemens - 11 Feb 2008

I'm seeing this problem on our servers: We use ISA Server to "reroute" the external query to an internal server. The end result is that the table headers will show the internal IP even if TWiki was accessed from the external IP. I have the following fix, with the corresponding update of the unit tests:

--- a/twikiplugins/TablePlugin/lib/TWiki/Plugins/TablePlugin/Core.pm
+++ b/twikiplugins/TablePlugin/lib/TWiki/Plugins/TablePlugin/Core.pm
@@ -1692,7 +1692,7 @@ sub handler {
         $plist =~ s/\;/\&/go;
         $plist =~ s/\&?sortcol.*up=[0-9]+\&?//go;
         $plist .= '&' if $plist;
-        $url = $cgi->url . $cgi->path_info() . '?' . $plist;
+        $url =  $cgi->path_info() . '?' . $plist;
         $url =~ s/\&/\&/go;
         $sortColFromUrl =
         $cgi->param('sortcol');    # zero based: 0 is first column

I'll experiment with the fix mentioned in Item5408. If nobody complains, I'll commit one of those fixes into 4.2.1 and trunk tonight.

-- TWiki:Main.RafaelAlvarez - 05 Aug 2008

I committed a change to this code recently. See Item5880. I can't test now if my change also fixes this issue and Item5408.

-- TWiki:Main.GilmarSantosJr - 05 Aug 2008

I'll test it tonight

-- TWiki:Main.RafaelAlvarez - 05 Aug 2008

Gilmar, sadly the changes to Item5880 didn't fix what I reported. Neither did the fix for Item5408.

I'm going to commit my change (modified to fit the current code), it should not affect Item5880.

-- TWiki:Main.RafaelAlvarez - 08 Aug 2008

Actually, my original change was wrong.

I just commited my fix (it worked for my setup). This need test by someone with someone that uses TWiki:Codev.ShorterURLs

-- TWiki:Main.RafaelAlvarez - 08 Aug 2008

Thanks for the fix, Rafael!

Since trunk is still broken, I'm reopening this (TWiki::Request::url doesn't support -absolute neither -rewrite).

-- TWiki:Main.GilmarSantosJr - 08 Aug 2008

I added support for -absolute to TWiki::Request::url() and merged the early fix to trunk.

-- TWiki:Main.GilmarSantosJr - 11 Aug 2008

I reopened this to update unit tests. Now it's (finally!) done. smile

-- TWiki:Main.GilmarSantosJr - 11 Aug 2008

Closing this bug after TWiki 4.3.0 release

-- TWiki:Main.SopanShewale - 06 Apr 2009

ItemTemplate
Summary TablePlugin produces bad links for sorting when using "short" URLs
ReportedBy TWiki:Main.JadeCravy
Codebase 4.0.2, ~twiki4
SVN Range Sun, 18 Jun 2006 build 10637
AppliesTo Extension
Component TablePlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:17367 TWikirev:17403 TWikirev:17404
TargetRelease patch
ReleasedIn 4.3.0
Edit | Attach | Watch | Print version | History: r28 < r27 < r26 < r25 < r24 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r28 - 2009-04-06 - SopanShewale
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback