SolveItproblems

SolveITProblems is a project of QFormat.net intellectual club

SolveITProblems это проект интеллектуального клуба QFormat.net

среда, 30 января 2013 г.

Livestreet v. 1.0.1. Profile problem

There is such a problem you may meet after installing 1.0.1 version. The problem shows when you link to someone's profile page. For example: www.example.com/profile/Example. Entering this url on your site some SQL error comes out. Let it be like this:

SQL Error: Unknown column 'pid' in 'where clause' at /home/users1/n/nave/domains/ecoport.uz/classes/modules/wall/mapper/Wall.mapper.class.php line 163
Array ( [code] => 1054 [message] => Unknown column 'pid' in 'where clause' [query] => SELECT count(*) as c FROM ls_wall WHERE 1 = 1 AND pid IS NULL AND 1 = 1 AND wall_user_id = 1; [context] => /home/users1/n/nave/domains/ecoport.uz/classes/modules/wall/mapper/Wall.mapper.class.php line 163 )


This causes of your old Livestreet version like 0.5 and using such a plugin like Wall. So, to resolve this proble you have to delete  4 tables in your livestreet DB.

These are:

prefix_wall
prefix_wall_comment
prefix_wall_settings
prefix_wall_vote


Then put this two SQL requests:

CREATE TABLE IF NOT EXISTS `prefix_wall` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pid` int(11) DEFAULT NULL,
  `wall_user_id` int(11) unsigned NOT NULL,
  `user_id` int(11) unsigned NOT NULL,
  `count_reply` int(11) NOT NULL DEFAULT '0',
  `last_reply` varchar(100) NOT NULL,
  `date_add` datetime NOT NULL,
  `ip` varchar(20) NOT NULL,
  `text` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `pid` (`pid`),
  KEY `wall_user_id` (`wall_user_id`),
  KEY `ip` (`ip`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
and
 
`prefix_wall`
  ADD CONSTRAINT `prefix_wall_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `prefix_wall_ibfk_1` FOREIGN KEY (`wall_user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE; 
 
 

After this you may check your profile page. Good luck!

Комментариев нет:

Отправка комментария