Problem with some forums now showing in the drop down menu

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
Check this video:

https://vid.me/diQ1

Basically a lot of forums aren't there.
If I add this line to config.php:

define('DISABLE_HOOKS', true);

They are shown. But if I disable all the products one by one... there is none of them that is apparently causing this problem. This is the same with the default style. Some suggestions?
 

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
This needs a smilie to represent my current face:

You're true. awww.klayz.com_community_images_smilies_fermosii.gif

I completely disabled them and now it is working. awww.klayz.com_community_images_smilies_supermorris.gif
Now I just need to search for the one causing the problem! I'll let you know (as probably I'll not be able to solve the problem by myself!).
 

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
Ok, it's related to the plugins (I have four of them) that check for new posts in categories: https://theadminzone.com/threads/if-category-has-new-posts-conditional-vb-3.137123/page-2 BirdOPrey5

In fact after disabling/enabling them I'm getting this error:

Fatal error: Call to undefined function fetch_last_post_array() in /*/public_html/community/global.php(400) : eval()'d code on line 25

This is the used code:

PHP:
$lista_forum_electronic_city = array(106,162,163,107,108,109,103,104,111,112,114,115,169);

require_once('includes/functions_forumlist.php');
global $vbulletin, $lastpostarray;

foreach ($lista_forum_electronic_city AS $tforum)
{
// call fetch_last_post_array() first to get last post info for forums
cache_ordered_forums(1);
if (!is_array($lastpostarray))
{
  fetch_last_post_array(-1);
}

$newstringpost = "";

  $forumidx = $tforum;
  $lastpostinfo = (empty($lastpostarray[$forumidx]) ? array() : $vbulletin->forumcache["$lastpostarray[$forumidx]"]);
  $forumx = $vbulletin->forumcache["$forumidx"];

  $isnew = fetch_forum_lightbulb($forumidx, $lastpostinfo, $forumx);

  if ($isnew == "new")
  {
  $fff[$tforum] = true;
  $nuovi_post_electronic_city = true;
  }
}
 

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
Yes, basically they are working if I enable them all. I first have to enable the one with this code:
Code:
require_once('includes/functions_forumlist.php');
global $vbulletin, $lastpostarray;
Or I get this error:
Fatal error: Call to undefined function fetch_last_post_array() in /*/public_html/community/global.php(400) : eval()'d code on line 25

The problem is that when I have them enabled then I get the problem with the forums not showing in the dropdown menu when, for example, I try to move a thread and I have to select the destination forum. The rest is all perfect. Just this problem.
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
Yes, because the fetch_last_post_array function is found in the functions_forumlist.php file. So that is expected behavior.
 

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
Ok, now I also changed the execution order of the plugins in order to have them in a more ordinated way.
Btw, the problem with disappearing forums is still there. Probably it is because of cache? What do you think? How could I fix it?
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
Are you saying if you disable these plugins (for your custom links) the forums come back?
 

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
Yes. Something like those IDs are taken and removed directly from the forums drop down menu when the plugins are active.
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
When did these forums start going away? You've had this custom code for a couple weeks, right?
 

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
Yes but I never noticed the issue. I used to not move discussions.
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
So is the problem only when moving threads? I looked at the video but I have no idea what it's showing or trying to show.
 

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
Watch this, so you better understand:
https://vid.me/801m
When I activate those plugins the forums in the dropdown are not shown. When I deactivate them (as shown in the video) the forums are there! Basically, when I have those plugins activated I can't move discussions to some forums. I also tried in the admin panel with the "Move" function but I get an error (something like "the selected destination forum can't have new discussions in").
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
OK... Easiest option would be to disable the mod on that move page...

edit the plugins, and put all the code inside the following conditional:

PHP:
if (THIS_SCRIPT != 'inlinemod')
{


//existing plugin code here


}

Basically the plugin won't execute on the move page so it should be no problem.
 

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
Hi BirdOPrey5 , I'm just bumping this one because I found other parts where all the forums should be there but they are not. This also happen in the search page and in postings (still when trying to move a discussion). So I tried this:

PHP:
if (THIS_SCRIPT != 'inlinemod' OR THIS_SCRIPT != 'postings' OR THIS_SCRIPT != 'search')
{


//existing plugin code here


}

But it doesn't work. The forums are still missing in search and in postings. Do you have any idea?
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
You're using ORs try to use ANDs.

PHP:
if (THIS_SCRIPT != 'inlinemod' AND THIS_SCRIPT != 'postings' AND THIS_SCRIPT != 'search')
{


//existing plugin code here


}
 

Dakoom

Web City
Joined
Jun 13, 2006
Messages
757
Thank you a lot for your reply, BirdOPrey5! I tried that but it doesn't work too. :(
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
How about

PHP:
if (!in_array(THIS_SCRIPT, array('inlinemod', 'postings' , 'search'))
{

//existing plugin code here

}

If that doesn't work, is it not working on any of the pages or just not working on one or two, and if so, which ones does it not work?
 
Top