Closed (duplicate)
Project:
External Link Popularity
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Oct 2011 at 20:52 UTC
Updated:
8 Jul 2013 at 13:46 UTC
I'm testing on a local environment before implementing on my County's site. I've checked permissions, setting Record to all users, including Anonymous. I want to track external links on one Content type, and have check that. I've tried clicking outside my browser in Safari to generate a Record aside from user "1". Is there anything else I'm missing? is there a tutorial on proper steps for integration? when i go into reports, there is absolutely nothing being generated. Thanks.
Comments
Comment #1
scuba_flygot the same problem.
Checked the database ( table pop_link_stats ) and that table is empty. so the click is not even recorded.
konrad can you check if the clicks are recorded in your database?
Comment #2
scuba_flyMake sure you have views and views ui enabled see: #1343448: views needs to be enabled to show the "admin/reports/pop_links" link in the reports section.
I've manually inserted some values in the database and they show up in the report section ( admin/reports/pop_links )
So I think the issue is really the recording of the external click.
Will keep you posted if i find anything that will fix this.
Comment #3
scuba_flyI cannot seem to find any code that is altering the links or adds the class 'pop_links' to the html elements (a) so the clicks can be recorded.Also if you look at the source code from your web browser the external links should eventually have given the class 'pop_links-processed' and an attached jQuery function that registers the click. But since the elements never get the pop_links class, elements are never processed and no 'click attachment' is created.
Any help is welcome but for now I'm gonna build it myself since the last update of the maintainer is from sept 2010.
Found a bug that is causing that no clicks are recorded:
In javascript (jQuery) in Drupal.settings.pop_links the used 'selector' is set to
#node-1 #node-2etc In my case I need it to be#article-1 #article-2etcI have set the '
node types' to 'article' OR to all content types inadmin/config/services/pop_linksbut that doesn't help drupal.settings.pop_links still contains node numbers.I think this is due the change in drupal 7 where al content items are nodes if I'm not mistaken.
Comment #4
scuba_flyAs stated before In my case I needed the hook to look for articles instead of nodes.
Turns out I was right.
Changed the code in the pop_links.module.
on line 79 in the pop_links_node_view function of the current version.
removed @ line 79:
'#nodes-' . $node->nid => array(added @ line 79:
'#article-' . $node->nid => array(now it works for me.
Although this is not a great solution because now I broke it for node type content.
Next step is to build in a check which content should be checked. but for now I'll use this because this works for what I need.
To check what content you need to be checked for clicks, look in the html source code of the page where the content is on. There should be a html element around each content with something like 'article-1' 'article-2' as id of that element.
Hope this helps someone and saves them the hours searching for the problem ;)
Comment #5
ralva83638 commentedI installed this module on a fresh D7.12 install and see no tracking happening as well for both links in body content and url field types, both in node display and view displays.
Comment #6
scuba_flycould be that you didn't set permissions to allow tracking of your used user role?
Comment #7
hvalentim commentedSame problem here. No blocks. No reports. Permissions were configured,
Comment #8
therobyouknow commentedOn my setup I can see that no data is being logged in pop_link_stats (same problem as scuba_fly )
If you manually insert a blank record (using phpmyadmin or sequelpro), you will see that this is listed in the reporting ( at admin/reports/pop_links/log )
So clearly while the reporting work the root cause is actually that the record is not getting entered in the first place.
Confirming that the module deliberately does not record links for user1 (admin) - code in pop_links.module checks for this:
So, as thisiskonrad says, one must ensure testing is done with a non-admin user for the logs to be generated.
Enabling permissions also mentioned in previous comments - need to ensure logging is enabled for appropriate roles in the usual people settings.
Given the root cause is that the record is not getting entered in the first place, I would suggest that this issue be closed and our discussions continue in an issue already raised:
https://drupal.org/node/1269290
scuba_fly's investigations and workaround remedies (thanks) are useful in helping us find a full solution.
Comment #9
therobyouknow commentedInterim solution provided here: https://drupal.org/node/1269290#comment-7625019
Credit and thanks to Clive for providing a way to access the Drupal node id for a page here: http://drupal.stackexchange.com/a/78667/1082