xoops forums

Forum Index


Board index » All Posts (toddherrold)




toddherrold

Quite a regular
Posted on: 2009/1/11 16:38
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#1

Re: Comments Not Displaying after recreating groups_users_link table

Thanks. So strange how these things just disappear from the dbase. I've had periodic problems with that on this install for years and have been waiting for XOOPS 3.0. . .

Anyway, definitely will buy you a beer or two. send me some info on how to do that!


toddherrold

Quite a regular
Posted on: 2009/1/11 16:29
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#2

Re: Comments Not Displaying after recreating groups_users_link table

You fixed it! what was wrong?


toddherrold

Quite a regular
Posted on: 2009/1/11 16:21
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#3

Re: Comments Not Displaying after recreating groups_users_link table

Trabis - thanks so much for your assistance. I sent you some login info via PM. Thanks for noticing that the comment issue is only in flat view! I thought I tested it and the issue was on all views but now I see that it is only flat view. Very strange.


toddherrold

Quite a regular
Posted on: 2009/1/11 16:06
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#4

Re: Comments Not Displaying after recreating groups_users_link table

modules versions:
smartsection 1.05
xcgal 2.02

I think i'm on XOOPS 2.2 something. . i know i never upgraded to 2.3.

com_status is set to 2 on comments in dbase


toddherrold

Quite a regular
Posted on: 2009/1/11 15:30
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#5

Re: Comments Not Displaying after recreating groups_users_link table

I also get these notices in xcgal:

Notice [PHP]: Only variables should be assigned by reference in file modules/smartsection/xoops_version.php line 527
Notice [PHP]: Only variables should be assigned by reference in file include/comment_view.php line 85


toddherrold

Quite a regular
Posted on: 2009/1/11 15:28
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#6

Re: Comments Not Displaying after recreating groups_users_link table

upon submitting a comment in smartsection, i get this error:

Fatal error: Call to undefined function: smartsection_seo_genurl() in . . ./htdocs/hotdogblog/modules/smartsection/include/notification.inc.php on line 48
Notice [PHP]: Only variables should be assigned by reference in file modules/smartsection/xoops_version.php line 527
Notice [PHP]: Only variables should be assigned by reference in file modules/smartsection/xoops_version.php line 527


toddherrold

Quite a regular
Posted on: 2009/1/11 15:24
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#7

Re: Comments Not Displaying after recreating groups_users_link table

yes, the comments don't appear to be showing in any module. I tested this in smartsection. When I posted a comment, I got a white page, then resent and got "no valid security token". . though the comments posted to the dbase, they do not display.


toddherrold

Quite a regular
Posted on: 2009/1/11 15:20
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#8

Re: $$ Job for Xoops Pro Bug Fixer - # of Posts/Member Rank Dbase Random Dumping/Reset

Someone found the solution to the user rank reset issue and I thought I would post it here in case someone finds this post.

Add the following as sync.php to your modules/profile/admin folder. . log in, access this page, press the button. User ranks re-established!

Thanks Onokazu!

Quote:
<?php
// $Id: sync.php,v 1.1 2005/012/1 10:30:33 irmtfan Exp $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
// <https://xoops.org/> //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
// Author: Kazumi Ono (AKA onokazu) //
// URL: http://www.myweb.ne.jp/, https://xoops.org/, http://www.xoopscube.jp/ //
// Project: The XOOPS Project //
// ------------------------------------------------------------------------- //
/*********************************************************/
/* Users Synchronize Function */
/*********************************************************/
include '../../../include/cp_header.php';
include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
xoops_cp_header();
$form = new XoopsThemeForm(_PROFILE_AM_SYNCHRONIZE, 'form', 'sync.php');
$form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
$form->display();
// Synchronize all users after click on submit button
if (isset($_POST['submit'])){
$sql = "SELECT uid FROM ".$xoopsDB->prefix("users")."";
if ( !$result = $xoopsDB->query($sql) ) {
exit(_PROFILE_AM_CNGUSERID);
}
while ($row = $xoopsDB->fetchArray($result)) {
$id = $row['uid'];
synchronize($id, "user");
}
redirect_header('user.php', 2, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_UPDATEUSER));
exit();
}
// synchronize function modified from XOOPS 2.0
function synchronize($id,$type)
{
global $xoopsDB;
switch($type) {
case 'user':
// Array of tables from which to count 'posts'
$tables = array();
// Count comments (approved only: com_status == XOOPS_COMMENT_ACTIVE)
include_once XOOPS_ROOT_PATH . '/include/comment_constants.php';
$tables[] = array ('table_name' => 'xoopscomments', 'uid_column' => 'com_uid', 'criteria' => new Criteria('com_status', XOOPS_COMMENT_ACTIVE));
// Count forum posts
$tables[] = array ('table_name' => 'bb_posts', 'uid_column' => 'uid');
$total_posts = 0;
foreach ($tables as $table) {
$criteria = new CriteriaCompo();
$criteria->add (new Criteria($table['uid_column'], $id));
if (!empty($table['criteria'])) {
$criteria->add ($table['criteria']);
}
$sql = "SELECT COUNT(*) AS total FROM ".$xoopsDB->prefix($table['table_name']) . ' ' . $criteria->renderWhere();
if ( $result = $xoopsDB->query($sql) ) {
if ($row = $xoopsDB->fetchArray($result)) {
$total_posts = $total_posts + $row['total'];
}
}
}
$sql = "UPDATE ".$xoopsDB->prefix("user_profile")." SET posts = $total_posts WHERE profileid = $id";
if ( !$result = $xoopsDB->query($sql) ) {
exit(sprintf(_PROFILE_AM_CNUUSER %s ,$id));
}
break;
case 'all users':
$sql = "SELECT uid FROM ".$xoopsDB->prefix("users")."";
if ( !$result = $xoopsDB->query($sql) ) {
exit(_PROFILE_AM_CNGUSERID);
}
while ($row = $xoopsDB->fetchArray($result)) {
$id = $row['uid'];
synchronize($id, "user");
echo $id;
}
break;
default:
break;
}
}
xoops_cp_footer();
?>


toddherrold

Quite a regular
Posted on: 2009/1/11 14:49
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#9

Re: Comments Not Displaying after recreating groups_users_link table

no, no changes to anything other than the group_users_link table and deleting those users. I suppose it's possible that the comments were not displaying before and I just didn't notice.

If anyone is interested in earning a little cash, I am willing to pay someone to figure out what the problem is and fix it. It's probably something stupid and minor, but I'm not enough of a programmer to figure it out.

Thanks!


toddherrold

Quite a regular
Posted on: 2009/1/11 4:12
toddherrold
toddherrold (Show more)
Quite a regular
Posts: 274
Since: 2004/6/13
#10

Comments Not Displaying after recreating groups_users_link table

I did an extensive search but couldn't find any posts that address the problem with my site. Hoping someone can assist.

The problem is that comments are no longer displaying on my site, like in xcgal. I checked the dbase and they are all still in there. They just won't display. I can still enter a new comment into the dbase too.

This happened when I was fixing another issue with users not being able to log in. Somehow the groups_users_link table got deleted, so users started setting up new accounts.

I recreated the link table by simply building a list of userids up to the numbers that were in the link table already. This enabled everyone to log in again.

Then I noticed some spammers and deleted a couple of accounts.

Then I noticed the comments stopped displaying. I ran debug but didn't see anything obvious to me.

Could the comments issue be related to me recreating the groups_users_link table? And since I just made a list of numbers 1 - 6519 or so for userids and applied group 2 to these. . is it possible that i input userids that should not exist and these are somehow messing the comments up?

Any thoughts would be greatly appreciated.

the site is hotdogblog.com



TopTop
(1) 2 3 4 ... 23 »