These forums are not for official support. If you are looking for official support please click here.
You are here: Home :: Forum Home :: Modules :: Hits :: Thread
Dear DevDemon Team
first of all thanks for all the great add-ons ,
secondly , I tried to access my Cp on 2012 and instead the followig database error occured
Error Number: 1054
Unknown column ‘hs.d_0’ in ‘field list’
SELECT `ct`.`title`, `hs`.`entry_id`, hs.d_0 AS hits FROM (`exp_hits_stats` hs) LEFT JOIN `exp_channel_titles` ct ON `hs`.`entry_id` = `ct`.`entry_id` WHERE `hs`.`type` = 1 AND `hs`.`year` = ‘2012’ ORDER BY `hs`.`d_0` DESC LIMIT 10
Filename: third_party/hits/acc.hits.php
Line Number: 124
any help is much appreciated , thanks
Hi,
I got the some error today and found a quick solution for that.
I don’t know if it is the best one, but it works at the moment.
I opened the acc.hits.php and replaced the following line with this code:
Original Code
// Which Ones?
switch ($type) {
case 'today':
$this->EE->db->order_by("hs.d_{$day}", 'DESC');
$this->EE->db->select("hs.d_{$day} AS hits", FALSE);
break;
case 'week':
$this->EE->db->order_by("hs.w_{$week}", 'DESC');
$this->EE->db->select("hs.w_{$week} AS hits");
break;
case 'month':
$this->EE->db->order_by("hs.m_{$month}", 'DESC');
$this->EE->db->select("hs.m_{$month} AS hits");
break;
case 'year':
$this->EE->db->order_by('hs.total', 'DESC');
$this->EE->db->select("hs.total AS hits");
break;
default:
$this->EE->db->order_by("hs.d_{$day}", 'DESC');
$this->EE->db->select("hs.d_{$day} AS hits", FALSE);
break;
}
New Code
// Which Ones?
switch ($type) {
case 'today':
if ($day == 0) {
$this->EE->db->order_by("hs.d_{$day}0", 'DESC');
$this->EE->db->select("hs.d_{$day}0 AS hits", FALSE);
} else {
$this->EE->db->order_by("hs.d_{$day}", 'DESC');
$this->EE->db->select("hs.d_{$day} AS hits", FALSE);
}
break;
case 'week':
$this->EE->db->order_by("hs.w_{$week}", 'DESC');
$this->EE->db->select("hs.w_{$week} AS hits");
break;
case 'month':
$this->EE->db->order_by("hs.m_{$month}", 'DESC');
$this->EE->db->select("hs.m_{$month} AS hits");
break;
case 'year':
$this->EE->db->order_by('hs.total', 'DESC');
$this->EE->db->select("hs.total AS hits");
break;
default:
if ($day == "0") {
$this->EE->db->order_by("hs.d_{$day}0", 'DESC');
$this->EE->db->select("hs.d_{$day}0 AS hits", FALSE);
} else {
$this->EE->db->order_by("hs.d_{$day}", 'DESC');
$this->EE->db->select("hs.d_{$day} AS hits", FALSE);
}
break;
}
This Code adds the the second 0 for the databasefield (d_0 to d_00).
As i said it’s a quick fix and it can be done better.
I hope that helps.
Kind Reagrds
Wolfgang
——————————-
NIWO Software
Software Development and RS Classes
I just wanna add, that this quick fix solves only the problem, that you can’t login in the CP.
But Hits itself doesn’t count at the moment.
——————————-
NIWO Software
Software Development and RS Classes
Same error here. Was getting a emails about bloggers unable to post,
attempted at reinstalling Hits, still same issue. Ended up just removing it for now….
Hi guys,
Sorry for this inconvenience, we fixed this issue immediately.
Please download Hits 2.3 from here or at devot-ee.com
Happy new year!
Hello,
Hits 2.3 has been released to deal with the problem with day 0 of the new year.
Brad
Hi
I’ve just replied this update and all my hits are reset to 0 :(
When i visited the hits module page it did hang for a long time, and I pressed the back button. I guess that might have broken the update process?
Are all my hits lost now?
Joobs,
If you know how to do it:
Can you send me an dump of your sql table? (Just need exp_hits_stats)
Email me at .(JavaScript must be enabled to view this email address)
hmm looking at the database there does seem to be hits information in there.
Maybe my understanding of it is wrong.
On the front end, if i view something by year, should it show the results for the last 365 days or would it show the results from the start of 2012 (eg 1 days worth)
Same in the CP. at the top of an entry was expecting the year value to show results from the last 365 days, but it’s reading 0. But looking at the database no one has viewed it yet in 2012.
Could you explain a bit what i should be expecting?
I’m experiencing no Hits results on the front end of the my sites. Also no data on the Hits tab. I’ve upgraded to 2.3 of Hits. Any ideas?
UPDATE: Hits has restarted the counts. So things are starting to show on the front-end, but all previous Hits data is not used.
Just chiming in here to subscribe to the thread and say I ran into this as well and am updating to 2.3.
Hits 2.3 does indeed help with the database error, but the hits data is stored in a yearly table..
So all stats are *current* year based. It’s only an issue for the first days of the year since it’s counting from jan1.
We are reviewing options for a future release to remove this limitation (which also would increase database usage and impact performance a bit)
I’m trying to download Hits 2.3 as I’m having the same problem as everyone else, but there is no option to download this item under my downloads. I can still see the record of the order from October, but It is making purchase the item again.
How can I download?
Jason
I’m actually getting anew error now after updating the software. It’s not on the backend, but it’s on the front end whenever I click the “read more” button at the bottom of a post.
Error Number: 1054
Unknown column 'site_id' in 'field list'
INSERT INTO `exp_hits_stats` (`site_id`, `entry_id`, `channel_id`, `item_id`, `type`, `year`, `total`, `m_01`, `w_01`, `d_02`) VALUES ('1', '152', '1', 0, 1, '2012', 1, 1, 1, 1)
Filename: third_party/hits/models/hits_model.php
Line Number: 76
Any ideas on a fix for this?
Did you run module updates?
I’m experiencing no Hits results on the front end of the my sites. Also no data on the Hits tab. I’ve upgraded to 2.3 of Hits. Any ideas?
UPDATE: Hits has restarted the counts. So things are starting to show on the front-end, but all previous Hits data is not used.
I’ve got a similar issue.
On the Hits tab it’s only counting hits on 1 channel, ignoring all the others.