×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: DB errors after installing 5.0cr2

DB errors after installing 5.0cr2 11 years 4 months ago #21744

  • Beat
  • Beat's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hello,

As I want to include some comment funtionality on my site, I've downloaded the CComment Core. I was already a little bit wondering, why only a release candidate is available for download, but well...

So after installing the component I observe the following:

The ccomment dashboard only gives me a sql error message:
Unknown column 'userid' in 'field list' SQL=SELECT COUNT('*') as count, COUNT(DISTINCT userid) as users, COUNT(DISTINCT ip) as ip, DATE(date) as date FROM scom_comment WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date GROUP BY DATE(date)

My pages where the comment function should appear fail with the error message
Error: 1054 - Unknown column 'contentid' in 'where clause' SQL=SELECT COUNT(*) FROM scom_comment WHERE contentid='13' AND component='com_content' AND published=1

Looks like something is wrong with the database installation, when installed completely from scratch.

So at the moment the component is pretty much useless :(

Cheerio

Beat

DB errors after installing 5.0cr2 11 years 4 months ago #21746

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Beat,
I have the strange feeling that you are not running a mysql server? Can that be the case?

Can you go to your db and search for scom_comment table? Both userid and contentid fields should be in this table.

Thanks in advance!
Daniel

DB errors after installing 5.0cr2 11 years 4 months ago #21748

  • Beat
  • Beat's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Hi Daniel,

Thanks for the quick reply.
I'm definitely running on MySQL ;)
So, I have re-installed the component and now it works (and I like it).
I also go a strange feeling that something with the database was not working correctly today. My provider told me that they have been previously attacked by hacker and maybe today this was the case again. I need to check back whith them.

As you mentioned it looked that the ccomment tables were not created.

But now, everything is fine!

Thanks again!

Cheerio

Beat

DB errors after installing 5.0cr2 11 years 4 months ago #21749

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Cool, glad to know that everything is working as expected now.

Don't forget to leave a review over here:
extensions.joomla.org/extensions/contact...icles-comments/24030

Cheers,
Daniel

DB errors after installing 5.0cr2 10 years 10 months ago #24216

  • Artaxterxes
  • Artaxterxes's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
I have the same following sql error after installing Ccomment Core or Pro 5.3 on a live online website:

1054 Unknown column 'userid' in 'field list' SQL=SELECT COUNT('*') as count, COUNT(DISTINCT userid) as users, COUNT(DISTINCT ip) as ip, DATE(date) as date FROM *prefix*_comment WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date GROUP BY DATE(date)


All pages, where Comments should be, have:

Unknown column 'contentid' in 'where clause' SQL=SELECT COUNT(*) FROM *prefix*_comment WHERE contentid='6' AND component='com_content' AND published=1


What does it mean? Can you help?

Some data:
Joomla! 3.2.1
PHP 5.3.27-1
Mysql 5.1.66-0

I can't find any tables created :(

Thanks in advance

DB errors after installing 5.0cr2 10 years 10 months ago #24224

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Are you sure that you are running a MySQL server? You say that there are no tables created - this should only happen if you use any other database than MySQL?

You can try to create the tables manually:
CREATE TABLE IF NOT EXISTS `#__comment` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `contentid` int(10) NOT NULL DEFAULT '0',
  `component` varchar(50) NOT NULL DEFAULT '',
  `ip` varchar(15) NOT NULL DEFAULT '',
  `userid` int(10) unsigned NOT NULL DEFAULT '0',
  `modified_by` int(10) unsigned NOT NULL DEFAULT '0',
  `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `name` varchar(30) NOT NULL DEFAULT '',
  `email` varchar(50) NOT NULL DEFAULT '',
  `website` varchar(100) NOT NULL DEFAULT '',
  `notify` tinyint(1) NOT NULL DEFAULT '0',
  `title` varchar(50) NOT NULL DEFAULT '',
  `comment` text NOT NULL,
  `published` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `spam` tinyint(1) NOT NULL DEFAULT '0',
  `voting_yes` int(10) NOT NULL DEFAULT '0',
  `voting_no` int(10) NOT NULL DEFAULT '0',
  `parentid` int(10) NOT NULL DEFAULT '-1',
  `importtable` varchar(30) NOT NULL DEFAULT '',
  `importid` int(10) NOT NULL DEFAULT '0',
  `importparentid` int(10) NOT NULL DEFAULT '-1',
  `unsubscribe_hash` VARCHAR( 255 ) NOT NULL ,
  `moderate_hash` VARCHAR( 255 ) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `com_contentid` (`component`,`contentid`)
) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
 
 
CREATE TABLE IF NOT EXISTS `#__comment_captcha` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `insertdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `referenceid` varchar(100) NOT NULL DEFAULT '',
  `hiddentext` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`ID`)
) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
 
CREATE TABLE IF NOT EXISTS `#__comment_setting` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `note` varchar(50) NOT NULL DEFAULT '',
  `component` varchar(50) NOT NULL DEFAULT '',
  `params` text NOT NULL,
  PRIMARY KEY (`id`)
) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
 
CREATE TABLE IF NOT EXISTS `#__comment_voting` (
  `id` int(10) NOT NULL DEFAULT '0',
  `ip` varchar(15) NOT NULL DEFAULT '',
  `time` int(11) NOT NULL DEFAULT '0'
) CHARACTER SET `utf8` COLLATE `utf8_general_ci`;
 
CREATE TABLE IF NOT EXISTS `#__comment_version` (
  `id` int(11) NOT NULL,
  `version` varchar(55) NOT NULL
) DEFAULT CHARSET=utf8;
 
CREATE TABLE IF NOT EXISTS `#__comment_queue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mailfrom` varchar(255) DEFAULT NULL,
  `fromname` varchar(255) DEFAULT NULL,
  `recipient` varchar(255) NOT NULL,
  `subject` text NOT NULL,
  `body` text NOT NULL,
  `created` datetime NOT NULL,
  `type` varchar(10) NOT NULL DEFAULT 'html',
  `status` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `status` (`status`)
) DEFAULT CHARSET=utf8;

#__ don't forget to replace with your table prefix.
The following user(s) said Thank You: Artaxterxes
  • Page:
  • 1
Time to create page: 0.109 seconds