Forum refuses to load topic list for one board on forum

Started by confuseamuse, September 01, 2017, 03:30:46 AM

Previous topic - Next topic

confuseamuse

For some reason, whenever I try to load the first board in the list on my forum, the browser attempts to access it and loads a blank screen.

However, every other board loads just fine. You can also access any topics made in the first board and (if you know the url) post new topics as well.

I don't understand why this is a problem or how to fix it.

Shambles

Have you edited the board name/description to include html?

confuseamuse

Quote from: Shambles on September 01, 2017, 04:08:21 AM
Have you edited the board name/description to include html?

No. The board name and description contain only plain text.

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters


Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

I believe that's what the problem is, yes...

Errorlog?

confuseamuse

#7
Error log on SMF doesn't mention it.

However, the error log for the PHP webpage says this:


[Sat Sep 02 18:01:03.622128 2017] [proxy_fcgi:error] [pid 31641] [client X.X.X.X:XXXX] AH01071: Got error 'PHP message: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/vhosts/cajican.org/httpdocs/Sources/Subs.php on line 1874\n', referer: https://cajican.org/forum/help-desk/
[Sat Sep 02 18:47:01.606071 2017] [proxy_fcgi:error] [pid 31644] [client X.X.X.X:XXXX] AH01071: Got error 'PHP message: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/vhosts/cajican.org/httpdocs/Sources/Subs.php on line 1944\n', referer: https://cajican.org/index.php?action=forum


Those two lines provide the following code:

Code (Subs.php (line 1874)) Select

$data = mb_encode_numericentity ($data, array (0x1F000, 0x1F9FF, 0, 0x1F9FF,0x02600, 0x027FF, 0, 0x027FF), 'UTF-8');


Which is part of the EmojiOne mod:


//Beginning of EmojiOne support
$data = mb_encode_numericentity ($data, array (0x1F000, 0x1F9FF, 0, 0x1F9FF,0x02600, 0x027FF, 0, 0x027FF), 'UTF-8');
preg_match_all('/&#([0-9]{4,6});/', $data, $matches, PREG_PATTERN_ORDER);
if (!empty($matches[0])) {
$replaces = array();
foreach ($matches[0] as $match => $dec) {
$int = substr($dec,2,-1);
if ($int >= 126976 && $int <= 129535 || $int >= 9728 && $int <= 10239) { // Emoji ranges
$hex = dechex($int);
if (isset($adec) && isset($replaces[$adec['dec']]) && ($int >= 127995 && $int <= 127999 || $int >= 127462 && $int <= 127487 && $adec['int'] >= 127462 && $adec['int'] <= 127487)) { // Modifiers Color || Flags
unset($replaces[$adec['dec']]);
$replaces[$adec['dec'].$dec] = '<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.6/assets/svg/'.$adec['hex'].'-'.$hex.'.svg" alt="'.$adec['dec'].$dec.'" class="SM_EmojiOne" />';
} else {
$replaces[$dec] = '<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.6/assets/svg/'.$hex.'.svg" alt="'.$dec.'" class="SM_EmojiOne" />';
$adec = array('dec' => $dec, 'int' => $int, 'hex' => $hex);
}


The other Subs.php line
Code (Subs.php (line 1944)) Select

$data = strtr($data, array("\t" => '&nbsp;&nbsp;&nbsp;'));


Is part of whatever this is supposed to be:


$data = strtr($data, array("\t" => '&nbsp;&nbsp;&nbsp;'));

if (!empty($modSettings['fixLongWords']) && $modSettings['fixLongWords'] > 5)
{
// The idea is, find words xx long, and then replace them with xx + space + more.
if ($smcFunc['strlen']($data) > $modSettings['fixLongWords'])
{
// This is done in a roundabout way because $breaker has "long words" :P.
$data = strtr($data, array($breaker => '< >', '&nbsp;' => $context['utf8'] ? "\xC2\xA0" : "\xA0"));
$data = preg_replace_callback(
'~(?<=[>;:!? ' . $non_breaking_space . '\]()]|^)([\w' . ($context['utf8'] ? '\pL' : '') . '\.]{' . $modSettings['fixLongWords'] . ',})~' . ($context['utf8'] ? 'u' : ''),
'word_break__preg_callback',
$data);
$data = strtr($data, array('< >' => $breaker, $context['utf8'] ? "\xC2\xA0" : "\xA0" => '&nbsp;'));
}
}


Other than that, I don't see any errors regarding the board not loading whatsoever. I thought PrettyUrls had something to do with it, but I uninstalled the mod and the issue persisted still. No idea why this is happening.

Sir Osis of Liver

Looks like pretty urls is still running.  You may have to uninstall it manually.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

confuseamuse

Quote from: Sir Osis of Liver on September 03, 2017, 12:13:20 AM
Looks like pretty urls is still running.  You may have to uninstall it manually.

I meant I uninstalled it earlier and tried to load the board and it still didn't work. So I don't think it's PrettyUrls causing the problem.

confuseamuse

#10
I just took a peek at the database without changing anything. What does id_profile do?

That's the only thing I can see that's different, and I doubt it's anything important since there are 3 working boards with a higher number than the Help Desk board and that's the only one with this problem.

EDIT: I found out the problem. It wasn't the database or PrettyUrls or even the board itself. It's the damned Guestbook topic. For some reason, the topic itself makes the board fail to load the topic list. Even though the topic itself works fine. I tried moving it to different boards, and each failed to load the topic list if the Guestbook was in it.

EDIT AGAIN: Ahh, now the problem is the EmojiOne mod. Guess I have to remove it. If you post an emoji, the emojione mod then replaces the characters with an image from the EmojiOne database. So that's the problem. It was refusing to load the topic list somehow. Not sure how that interferes with something where the mod wasn't even used at all but it did.

Sir Osis of Liver

You can install a mod that conflicts with a previously installed mod by editing the same code block.  This can cause problems that appear unrelated to the last mod installed.  The more mods you install, the more likely a conflict will arise.  Best to be conservative installing mods, just use ones you really need.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

Although I have had as many as 211 mods installed at once. :P
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

confuseamuse

Quote from: Sir Osis of Liver on September 03, 2017, 04:12:43 PM
You can install a mod that conflicts with a previously installed mod by editing the same code block.  This can cause problems that appear unrelated to the last mod installed.  The more mods you install, the more likely a conflict will arise.  Best to be conservative installing mods, just use ones you really need.

I think I'm going to use the default version of the Subs.php file to replace what I'm assuming is broken code (that probably works by sheer luck). Hopefully, that lets me use the EmojiOne mod again, as it is very useful.

Kindred

NO NO NO NO NO NO NO NO


doing that will screw up pretty much every mod that you have installed, since many many mods make edits to subs.php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: