2
Well, I found the problem myself.
It appears that in the file "include\comment_view.php", there is a section of code that looks like this:
Quote:
if ($com_mode == '') {
if (is_object($xoopsUser)) {
$com_mode = $xoopsUser->getVar('umode');
} else {
$com_mode = $xoopsConfig['com_mode'];
}
Some of my site's members had a umode of nothing. In other words, $com_mode became an empty string. This doesn't work with the common template code that people insert in order to display comments:
Quote:
<{if $comment_mode == "flat"}>
<{include file="db:system_comments_flat.html"}>
<{elseif $comment_mode == "thread"}>
<{include file="db:system_comments_thread.html"}>
<{elseif $comment_mode == "nest"}>
<{include file="db:system_comments_nest.html"}>
<{/if}>
As you can see, a $comment_mode equal to the empty string will cause no comments to be displayed. So, to correct the issue on my site, I've added a single line to the code above:
Quote:
if ($com_mode == '') {
if (is_object($xoopsUser)) {
$com_mode = $xoopsUser->getVar('umode');
if ($com_mode == '') {$com_mode = $xoopsConfig['com_mode'];}; }
else {
$com_mode = $xoopsConfig['com_mode'];
}
So now if the umode returns nothing, the $com_mode variable gets the default XOOPS setting instead.
--------------------------
I won't include this as a bug fix because I don't know that I've fixed the bug. Umode, for all I know, maybe shouldn't ever return an empty string. In that case, the code that generates the umode variable should be checked. Other than that, however, this hack seems to work just fine for me.