|
Joined: May 2006
Posts: 243 Likes: 1
Enthusiast
|
Enthusiast
Joined: May 2006
Posts: 243 Likes: 1 |
In this thread, Converting links from Classic to Threads, Gizmo wrote: The redirectors are the files ultimatebb.cgi and ultimatebb.php that are in the file with the importer file for classic to threads; it's a dead simple install, simply update the forumurl in the scripts, then overnight your old files on your old forum install and the old links will forward to the new locations. Not quite "dead simple" for people like me. But I think I have done it right, but in a thread which links to another thread, and both are imported from Classic, all I get is the forum summary on the redirect. For example, in the classic forum, this link goes from one thread to another: Fall Conditions on the Main Whitney Trail Note that this Classic board is still running, and is the currently active board.But in my Threads board, the link fails: Source thread is here The target link is: Fall Conditions on the Main Whitney TrailBut you can see by clicking on the last link, it goes to the forum summary, and not the actual thread, which should be this: Fall Conditions on the Main Whitney TrailPlease note that my Threads board is on a new server, with a temporary URL starting with "www2". So if you start clicking on links above, modify the www to www2 to interact with the Threads testing area.Any ideas what I need to change to enable the redirection to go to the actual thread?
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
If i'm following you. Why arent the internal links working? They wont, you would have to edit them manually. Its to do with the new URL's... The re-direct will preven anyone, looking at old posts on the old forum and forward them to your new home. I had to do it too, but its worth it, ask members to report broken links with the notify button
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Jul 2006
Posts: 4,057
|
Joined: Jul 2006
Posts: 4,057 |
I didnt use any mass redirect scripts i only had mine set up so what ever the old url it would point tham at my new forums. (It came with UBB - But i cant find mine now ?)
And Need it again.
BOOM !! Version v7.6.1.1 People who inspire me Isaac ME Gizmo
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
The threads importer quite simply will not do the same as the classic importer; simply put, the classic importer was more heavily tested because there where more testers for it.
The threads redirectors will ONLY redirect posts/threads/users (if i recall), it will not redirect to various forums/forum summary (unlike the UBB.Classic redirectors).
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Gizmo, threads will redirect to the list of posts in a forum as well, that's why it comes with a postlist.php replacement script. Besides, this isn't a threads importer problem, it's a classic one
Last edited by Rick; 03/14/2007 11:03 AM.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Steve, are any of the redirections working properly or are they all not working?
|
|
|
|
Joined: May 2006
Posts: 243 Likes: 1
Enthusiast
|
Enthusiast
Joined: May 2006
Posts: 243 Likes: 1 |
Rick, I haven't checked in depth, but as far as I can tell, all links redirect to the forum list page. The threads redirectors will ONLY redirect posts/threads/users (if i recall), it will not redirect to various forums/forum summary (unlike the UBB.Classic redirectors). Gizmo, are you saying that a link to another thread within the same forum is impossible to redirect? I thought Threads import created an index connecting Threads posts with their old Classic thread/post_id and new post, and the redirect script would be smart enough to parse the url and look up the new post_id, and go there.
Last edited by Steve C; 03/14/2007 12:14 PM.
|
|
|
|
Joined: May 2006
Posts: 243 Likes: 1
Enthusiast
|
Enthusiast
Joined: May 2006
Posts: 243 Likes: 1 |
Here are the top 28 lines of the ultimatebb.cgi file installed on the www2 server in the /cgi-bin/ubb directory, and its permission is 755 #!/usr/bin/perl
#
# Copyright (C) 2005 Groupee, Inc.
#
#
# Most of this code stolen straight from the original ultimatebb.cgi
# Thanks to Ian Spence
# Replacement ultimatebb.cgi script.
# $URL needs to be set to your ubb.threads installation.
# $URL = "http://192.168.0.4/ubbthreads";
$URL = "http://www2.whitneyportalstore.com/forum";
# site_id only needs to be changed if you've imported multiple forums. The importer
# will tell you what your site id needs to be changed to
$site_id = 1;
# What type of redirect shall we send?
# 0 - Don't send a 301/302 header, my webserver does this. (Enable this if 301/302 results in an ISE or blank page)
# 301 - Permanent
# 302 - Temporary
$redirect = 0;
# Search engine friendly redirects? Change to 0 to disable
$search_friendly = 1;
# You shouldn't need to edit anything below this line
Last edited by Steve C; 03/14/2007 12:28 PM.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Steve, did you come across any problems during the import? The importer will try to lookup the proper post to redirect to, but if it can't it will default to just going to the main page. It almost sounds like the ubbt_IMPORT_MAP didn't get populated during the import.
|
|
|
|
Joined: May 2006
Posts: 243 Likes: 1
Enthusiast
|
Enthusiast
Joined: May 2006
Posts: 243 Likes: 1 |
The import had problems in that (not sure of my terminology here) the php processes on the server could not access the cgi-bin side. I got the host site administrator involved, and once he figured that out and enabled the cgi access, he ran the import himself. Looking in the Database Tools on the Control Panel, ubbt_IMPORT_MAP shows: 32298 rows, Data_length=662.36 KB, Index_length=1.08 MB Here is some data from the table: SELECT * FROM ubbt_IMPORT_MAP where OLD_TOPIC_ID=5252
SITE_ID POST_ID OLD_TOPIC_ID OLD_POST_ID OLD_FORUM_ID
1 31782 5252 1 1
1 31783 5252 2 1
1 31784 5252 3 1
1 31785 5252 4 1
1 31786 5252 5 1
1 31787 5252 6 1
1 31788 5252 7 1
1 31789 5252 8 1
1 31790 5252 9 1
Last edited by Steve C; 03/14/2007 1:45 PM.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Hmm, the data looks ok. What you could try to do is look up the OLD_FORUM_ID and OLD_TOPIC_ID and see if it has an entry for it (those would come from the ubb.classic links). And then try bringing up that POST_ID in ubb.threads, like ubbthreads.php?ubb=showflat&Number=POST_ID
If that works, then it's a problem with the redirect itself and we'll probably need to open a support ticket so I can take a closer look.
|
|
|
|
Joined: May 2006
Posts: 243 Likes: 1
Enthusiast
|
Enthusiast
Joined: May 2006
Posts: 243 Likes: 1 |
Using the above OLD_TOPIC_ID of 5252 and adding the leading zeros, I get this link, and as you can see, it takes me into the correct thread in the currently active Classic board. Using the above POST_ID of 31782, I get this link, which brings me into the same thread in Threads. Note that I constructed the URL differently from your recommendation above, and instead based it on how a url in my Threads board appears: .../forum/ubbthreads.php/ubb/showflat/Number/31782
Last edited by Steve C; 03/14/2007 3:49 PM.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Ok, so it appears the data is definitely correct and it's a matter of the redirect script not doing something properly. If you want, you can go ahead and open up a support ticket so I can get ftp information so I can take a closer look.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
Gizmo, threads will redirect to the list of posts in a forum as well, that's why it comes with a postlist.php replacement script. Besides, this isn't a threads importer problem, it's a classic one Ahh, when he referenced his threads board i was thinking he had another threads forum that he also upgraded; my bad ... Though I heard people whining about forums not redirecting before with the import map, so i was going off of that ...
|
|
|
|
Joined: May 2006
Posts: 243 Likes: 1
Enthusiast
|
Enthusiast
Joined: May 2006
Posts: 243 Likes: 1 |
Ok, I posted a "basic support" question...
But continuing here:
I played with the ultimatebb.cgi script a bit, and found it skips to the Else from the If statement at about line 101: # If ubb = get_topic we'll redirect to showflat if ($in{'ubb'} eq "get_topic") {
So I temporarily copied the first print(qq~Location: $URL... from line (110) down to where the third line is (117) to see what it would do. The result was a URL without the topic number or any other values from the ubbt_IMPORT_MAP table.
I can't read the code very well, but where and how does the script query the data from the table? It does not look like the query is working.
And might my server have something to block a .cgi script from accessing the MySql database? (The site admin says no.)
|
|
|
|
Joined: May 2006
Posts: 243 Likes: 1
Enthusiast
|
Enthusiast
Joined: May 2006
Posts: 243 Likes: 1 |
Ahh, when he referenced his threads board i was thinking he had another threads forum that he also upgraded; my bad ... I have converted only one Classic board (with only 3 forums) to Threads. However, the new Threads board is on a new server, and is not live yet, so we can play with it until we get this problem worked out. The old Classic board is alive and running, on the "www." url, and the new Threads server is at the "www2." url. Though I heard people whining about forums not redirecting before with the import map, so i was going off of that ... Just like Mark S wrote above. Perhaps they are encountered the same problem, but never worked through it.
|
|
|
|
Joined: May 2006
Posts: 243 Likes: 1
Enthusiast
|
Enthusiast
Joined: May 2006
Posts: 243 Likes: 1 |
Followup: Rick got it working! He changed the lines in the ultimatebb.cgi redirect script. ...and as a result, the links I posted at the top of this thread are now working properly! He replaced these 8 lines (38-45): # Get our arguments
%in = map{
my @z = param($_);
( scalar(@z) > 1 ?
( $_ => join(",", @z) ) :
( $_ => $z[0] )
)
} param(); with these: ($ENV{'REQUEST_METHOD'} eq "POST") and read(STDIN, $input, $ENV{'CONTENT_LENGTH'});
($ENV{'REQUEST_METHOD'} eq "GET") and ($input = $ENV{'QUERY_STRING'});
my @pairs = split(/;/, $input);
foreach (@pairs) {
my ($name, $value) = split /=/;
# Un-Webify plus signs and %-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;
$value =~ s/\n/<br>/g;
$value =~ s/\r//g;
$in{$name} = $value;
} Thanks so much, Rick.
|
|
|
|
Joined: Jun 2006
Posts: 3,837
Carpal Tunnel
|
Carpal Tunnel
Joined: Jun 2006
Posts: 3,837 |
Though I heard people whining about forums not redirecting before with the import map, so i was going off of that ... I resent the word whining
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
You know, its funny when the people you're making fun of realize it off the bat ... I wub you ian .
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
3 members (Nightcrawler, Ruben, 1 invisible),
501
guests, and
194
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|