Support Forum

Add New Topic not working on Topic page but works in Forum page

32 Answers

New Answer

KE Kenn
Kenn
Member

The server is running PHP 5.3.3

I have finished setting up a template clone of the site and have installed SimplePress and all the buttons and features are working as they should so it is obviously a conflict with one of the plugins I can’t turn off.

Could you please advise how I get all the content from one install to the other?

All the tables are in the same database but I obviously have two sets now the new ones with prefix eg. ab_3 instead of ab?

Hope you can help.

Kenn

YS Yellow Swordfish
Yellow Swordfish
Member

Simple:Press tables all start with the prefix ‘sf’ so they are easy to identify. The forum also needs the WordPress ‘users’ and ‘usermeta’ tables to tie up with the ‘sfmembers’ SP table that holds extended forum based user information.

If all of your SP tables are in a different database then it is possible to export the ones you need to copy to a sql dump file and then import them back into the second database. This will work as long as they have the same WordPress prefix. You can make exports and imports using a tool such as phpMyAdmin. If you go down this route make sure you include the DROP TABLE instruction which is an option. This will ensure that when the sql dump is imported again the existing tables will be removed first.

KE Kenn
Kenn
Member

I’m pleased to say I’ve copied the whole forum to the subsite /forum and I have put the forum on the home page by setting a static page as the home page. When I click anywhere in the forum though it navigates to the page and the URL changes is there any way I can avoid this? I’m sure I saw it on another thread but I can’t find it.

 

Old forum

sitename/pagename/forum name

 

URL at the moment on the home page:

sitename/subsitename/forum name

 

But when you click on anything in the forum moves to:

sitename/subsitename/pagename/forum name

 

What I want to achieve is

sitename/subsitename/forum name

 

That way all the existing links throughout the site and sites linking in will still work as the location will be the same.

 

MP Mr Papa
Mr Papa
Member

not really… thats how wp pages work…  if you show wp page as the home page, its child pages (ie forum pages) still have to show the parent in the url…

KE Kenn
Kenn
Member

There are a lot of pages and posts within the site that link to the forum.

Would it possible to add an .htaccess rule to redirect all the old pages to the new ones?

 

From

sitename/discuss/abc

To

sitename/forum/discuss

 

After doing some research what I’m concerned about is that if I add a rewrite rule with the word discuss in, it will interfere with the new forum pages making them sitename/forum/forum/discuss and break the new forum location.

I am not familiar with rewrite rules but I know what I’m after is

If URL = www.sitename.co.uk/discuss/   change to = www.sitename.co.uk/forum/discuss

 

As you have referred before to the forum using some URL rewriting blackmagic would you know what I need to add?

Thanks for your continued help.

 

 

 

YS Yellow Swordfish
Yellow Swordfish
Member

It’s not my area of expertise but I believe an .htaccess rule for this scenario should not effect the forum slug and WP rewrite rules. At least that would be my understanding…

KE Kenn
Kenn
Member

Sorry I don’t think I was clear, I understand that the forum will display as it is, I would like the rewrite rule for any external links coming in so they will be redirected to the same content but in the new location.

The customer also uses a lot of internal links to their forum within blog posts & pages and a rewrite rule would stop users going to a 404 page.

YS Yellow Swordfish
Yellow Swordfish
Member

Well I would still have thought the .htaccess approach would be best for external links coming in.

For ‘dead’ links within WP posts/pages then it sounds to me like you should perhaps be looking at something like the ‘Permalink Redirect’ plugin. That should surely do what you want. The only thing about that is that you DO need to exclude the forum slug from it – it has an exclusion section in the setup I understand.

KE Kenn
Kenn
Member

I have found a good redirect plugin called 404 Redirected which is handling the pages well. But it is redirecting all the forum pages to the main forum page, good but of course we would like it to go through the the correct topic.

I agree that this part should be handled by a rewrite rule butI’ve been researching this afternoon and still can’t figure out how to write the rule for .htaccess do you have any ideas?

Thanks

YS Yellow Swordfish
Yellow Swordfish
Member

No – as I said – personally I can not help with the .htaccess rules stuff. I would think there must be huge numbers of pages out on the web dealing with it though.

As I said – any plugin you used would have to have the capability to exclude the forum slug – basically to ignore it which I know can be done with the popular ‘Permalink Redirect’ plugin.

MP Mr Papa
Mr Papa
Member

good luck… let us know what you find in case others want to do the same…

KE Kenn
Kenn
Member

I couldn’t figure this out so I had to get extra help but I’m happy to share in case it’s useful to anyone else.

It’s only been active for a short time but seems to be working.

 

To redirect traffic from the main site to the subsite forum location

Previous Location was /discuss

New location forum/discuss

—————————————————

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} !^/(forum)$
Redirect 301 /discuss/ /forum/discuss/

RewriteCond %{REQUEST_URI} !^/(forum)$
Redirect 301 /discuss/(.*) /forum/discuss/$1