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
I’m just installed Hits on EE v2.2.1 - Build: date 20110705 and I’m trying to display the top hit items in order on my homepage. My code looks like this:
{exp:hits:items type="entries" top="week" limit="10"}
{exp:channel:entries channel="golf-course" fixed_order="{hits:entries}" dynamic="off"}
<p>{title}</p>
{/exp:channel:entries}
{/exp:hits:items}
No matter what I do, this simply won’t render anything…Just completely blank. I can confirm that I have the hits tracking code on the detail pages (if that even matters) and it is in fact tracking hits because there is data in the Accessory in the CP.
Thanks in advance for the help,
Adam
Is this the only code in your template?
If yes, could you add some text above the tags to see if the page will render something..
I can confirm that the page will render properly if the exp:hits:items tags are not present. It will render plain text and will also display what’s in my channel:entries loop
But as soon as you put in the hits tag the whole page is blank?
Can you turn on PHP Error Log?
http://expressionengine.com/user_guide/cp/admin/system_admin/output_and_debugging_preferences.html
Set: Debug Preference
To: PHP/SQL error messages shown to anyone
And render the page again
Yes, as soon as I put the hits tag in the whole page goes blank.
I turned on the PHP Error log and I still get absolutely nothing when I try to render the page.
With template debugging on, I get this (seems to be some Hits Type Error at the end there):
TEMPLATE DEBUGGING
(0.000010 / 3.87MB) - Begin Template Processing -
(0.001196 / 3.91MB) URI: site/test
(0.001214 / 3.91MB) Path.php Template: /
(0.001231 / 3.91MB) Retrieving Template
(0.001244 / 3.91MB) Parsing Template URI
(0.001900 / 3.91MB) Template Group Found: site
(0.002434 / 3.91MB) Retrieving Template from Database: site/test
(0.002776 / 3.92MB) Template Found
(0.003207 / 3.92MB) Retrieving Template from File
(0.006663 / 4.10MB) Template Type: webpage
(0.006692 / 4.10MB) Parsing Site Variables
(0.006734 / 4.10MB) Snippets (Keys): freelancer_version|site_id|site_label|site_short_name|last_segment
(0.006749 / 4.10MB) Snippets (Values): FALSE|1|Fairwayflow|default_site|test
(0.006884 / 4.10MB) Parse Date Format String Constants
(0.006905 / 4.10MB) Parse Current Time Variables
(0.006949 / 4.10MB) Parsing Segment, Embed, and Global Vars Conditionals
(0.009572 / 4.16MB) - Beginning Tag Processing -
(0.009597 / 4.16MB) Parsing Tags in Template
(0.009633 / 4.16MB) Tag: {exp:hits:items type="entries" top="week" limit="10"}
(0.009722 / 4.17MB) Closing Tag Found
(0.009773 / 4.17MB) Processing Tags
(0.009808 / 4.17MB) Module Tag: Hits/items
(0.009826 / 4.17MB) Including Files for Plugins and Modules
(0.012515 / 4.35MB) Files for Plugins and Modules All Included
(0.013227 / 4.36MB) Beginning Final Tag Data Processing
(0.013250 / 4.36MB) Calling Class/Method: Hits/items
(0.013439 / 4.36MB) -> Class Called: Hits
(0.016817 / 4.54MB) -> Method Called: items
(0.016882 / 4.54MB) HITS: Hits Type Error
(0.016958 / 4.54MB) -> Data Returned
(0.016994 / 4.54MB) - End Tag Processing -
(0.017036 / 4.53MB) - End Template Processing -
(0.017048 / 4.53MB) Parse Global Variables
(0.017996 / 4.54MB) Template Parsing Finished
Memory Usage: 4,763,812 bytes
Can you change type=“entries” to type=“entry”
When I change it to “entry” it does output, but it outputs the entries twice….It looks like this:
Entry 1
Entry 2
Entry 1
Entry 2
If I understand correctly how this module works, shouldn’t it just out them once in the order of MOST HITS? (i.e. the entry with more hits gets outputted first??)
Send you an email with a new Hits build
Let me know if it worked.