Support Forum

Problem automatic (and not required) redirection url sub-forums

LD laura.dl
laura.dl
Member

Hi,

I have a problem with the url of the three sub-forums. Do not know why, but when I click on the forum page redirects to another page of the site (specifically, replacing “/forum/” with “/slides/”).

How do I prevent it?

Here’s the link (the three forums are: “L’arte del racconto”, “Scrivere un romanzo:le basi”, “Scrivere un romanzo:la revisione”)

Thanks in advance

14 Answers

New Answer

LD laura.dl
laura.dl
Member

I do not understand why but now everything seems ok.

Possible that the forum will be adjusted by yourself?? eek

YS Yellow Swordfish
Yellow Swordfish
Member

Have you fixed whatever the cause was? They are all loading up perfectly for me?

LD laura.dl
laura.dl
Member

The first thing I thought is that since the site there are three static pages with the same name, maybe there was some conflict, but I do not think is possible because the pages of the forum are in a different directory (ie /forum /) .

YS Yellow Swordfish
Yellow Swordfish
Member

It maybe just needed a flush of the WP rewrite rules to understand the permalinks. So – is all good now?

YS Yellow Swordfish
Yellow Swordfish
Member

Still perfect from my end. Have you tried clearing out your browser cache?

LD laura.dl
laura.dl
Member

For example, the problem is not there now, but every time I get.
Maybe in a few moments wordpress gets confused?

Maybe I should change the slug to differentiate the forum from the pages?

YS Yellow Swordfish
Yellow Swordfish
Member

Always worth doing to avoid possible trouble.

LD laura.dl
laura.dl
Member

In my admin panel of the forum I have seen some reports that are error log.

Could explain the problem?

Here is the screen.

YS Yellow Swordfish
Yellow Swordfish
Member

I really do not think so although it is a strange error to be getting.
Do you want to correct it if I give you the code fix so we can see?

YS Yellow Swordfish
Yellow Swordfish
Member

OK – here we go.

The file you need is /forum/content/classes/sp-forum-view-class.php

The line of code (line 454) is quite a long way down. If you find the start of the function –  sp_forumview_build_subforums() – then the line we need is not far above that.

It currently reads:

if ($f[$forumid]->children) {

and you can change it to:

if (isset($f[$forumid]->children) && $f[$forumid]->children) {

be interested to hear back from you.

LD laura.dl
laura.dl
Member

Then: I copied and put the code in the specified line.
I also reported the slug of a forum of the previous version (the same as the page).
I tried a couple of times and seems to work.

For safety during the day I will try again every so often to see if the erroroccurs again.

For the moment everything is ok, thanks!