Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[FIXED] The new functionality "hits" not work 10 Oct 2012 06:26 #4351

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
The new functionality "hits" not work, the field is not incremented when an item is displayed. Someone can help me? Thank you.

Please Log in or Create an account to join the conversation.

Last edit: by smarano.

Re: The new functionality "hits" not work 10 Oct 2012 11:59 #4363

+1 is the same for me
BUILD => Cook version 2.0 / joomla 2.5
config => jquery - condensed - reduced and DB automatisms = model
Have tried various combinations of the following and it will not increment (front end)

Default value = 0
default value =1
no default value
Pre Fills form = checked
prefills form = unchecked
with fly view brick
with form brick

then created a link on a the collection view field and then followed the URL

Again will not increment

Is there something we are missing

Published default =1 tested
Access = 1 tested
Logged in as admin and various users

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

Re: The new functionality "hits" not work 10 Oct 2012 14:43 #4365

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
yes, I too have tried all the settings, but nothing to do!

I would like at this point to know if anyone does!

Please Log in or Create an account to join the conversation.

Re: The new functionality "hits" not work 11 Oct 2012 06:53 #4385

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I think it works, but you must be aware that this functionality is a unique-visitor. Means that if you want to see the incrementation, you must log out and log in again.

Maybe there is a real issue, can you confirm me that you have an issue, even logging out/in ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: The new functionality "hits" not work 11 Oct 2012 08:32 #4394

Hi Admin
thanks have created a test project "test hits"
have logged in / out tried different sandbox users
does the hits field require
a default value
or prefill be checked?
does need a link in the collection layout field to a fly layout
or
does it have to be a form layout

Thanks Again

Please Log in or Create an account to join the conversation.

Re: The new functionality "hits" not work 11 Oct 2012 10:22 #4406

Hi admin
This may help you...
I Downloaded my test hits component
Cook version 2.0
Installed
When creating menu item for the
Item layout
I got a SQL error in the joomla
menu manager: new menu item
Table database.tableprefix_testhits_testhits doesn't exist
TableSQL= some_test_string from table prefix_testhits_testhits where ID=0

Please Log in or Create an account to join the conversation.

Re: The new functionality "hits" not work 11 Oct 2012 10:45 #4407

Hi Admin
I think i found it?
I checked the jmodel.php file and found that the hit is not incremented...
added $hits[] = $id+1; as shown below and it appears to work as you described above

- it will only increment once per logged in user click
- it will increment again if a guest user logs in/out
- it will increment again if the the user logs out/in
		//This item has already been seen during this session
		if (in_array($id, $hits))
			return;

		$hits[] = $id;

		//Increment the hits
		$table = $this->getTable();
		if (!$table->hit($id))
			return false;
		
		$hits[] = $id+1; // <= added this line here (seems to work??)

		$app->setUserState($this->context . '.hits', $hits);

		return true;
Regards BTB300
The following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

Re: The new functionality "hits" not work 11 Oct 2012 11:13 #4409

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Nice find @BTB3000!

i was going to look there as soon as I'd had a chance to test/use the new hits functionality if it was still not resolved!

Thanks,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

[FIXED?]The new functionality "hits" now works 11 Oct 2012 15:25 #4417

Just Tested in sandbox and it works a described above by admin...
(Admin on Holidays... but still secretively working i see :lol: )

@smarano
could you please rebuild your component and test in sand box + confirm if working as described above by admin
(dont forget log out after viewing then log back in)

use the login button at the at top of sandbox - this will then display the logout button - log out and then login again

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

Re: [FIXED]The new functionality "hits" now works 12 Oct 2012 11:45 #4431

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
yes, that was the problem, I had just solved locally. It all works great!

Please Log in or Create an account to join the conversation.

Last edit: by smarano.

Re: [FIXED]The new functionality "hits" now works 14 Oct 2012 21:37 #4505

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
No, no, I didn't changed anything there. Maybe an angel ...

The fix you propose BTB300 is not changing anything I think because the line:

$table->hit();

is doing the job.

I don't know what happen to you. I think a wrong test, because it is really simple fonctionality with no reason to block.
Maybe a problem with the session ?

Can I close ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: [FIXED]The new functionality "hits" now works 15 Oct 2012 07:49 #4526

Hi Admin
whatever the solution was it now works for me... no further issues seen
OK to close from my point of view

Thank you again
The following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.
  • Page:
  • 1
Time to create page: 0.085 seconds
In the begining i would like to say that j-cook is absolutly fantastic tool! And the person who created it is a genius.
Czyżak (Forum)  

Get Started