Project:Statistics filtering
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Frank Ralf
Status:closed (fixed)
Issue tags:D7 porting

Issue Summary

theme itself

subscribe

Comments

#1

Here's a first stab at a D7 port. I ran the code through Coder an got rid of all issues. The module installs ok, but I haven't done any thorough testing.

There are still some parts where the code should be brushed up. And I still have to figure out how to make this an official release using Git, so for the time being just posting the code here.

AttachmentSize
statistics_filter_7.x-dev.zip 11.56 KB

#2

Hi,

Thank you for your work. Just to let you know that unfortunately the module creates a second header (I'm afraid is actually a second/double page) on the bottom of a node when you check that particular logged user to have the access ignored. I tried it with the administrator account. And I was able to replicate it with different themes. So, I'm afraid is related to this module.

#3

Thanks for testing and the feedback. Will look into this as soon as I find the time.

#4

Status:active» needs review

I cannot reproduce this error. Could you perhaps post an error message and/or a screenshot?

Be sure to have cleared all caches, run cron.php and perhaps also update.php.

#5

Thank you Frank for your answer. I am using D 7.12. I used to have the 6 version of this module but I uninstalled it before migration. And of course, I run update.php and I cleared my caches including forcefully emptying all the cache tables in my database. So, basically I doubt there is any other cache left somewhere.
I am logged using the administrator account and I checked the box in the filter settings for "Ignore administrator". The error comes up only on the /content/ pages. And it is regardless of page.
I'm sending here in attachment a screenshot of the error.
Thank you again for your work and assistance.

AttachmentSize
error_stats_filter.JPG 81.59 KB

#6

Thanks for the screenshot. Please try the attached code. I think I encountered the same error after posting the above code and might have already amended the code.

AttachmentSize
statistics_filter_7.x_1.0-dev.zip 11.32 KB

#7

Hi Frank,

this time the error seems to point to some declaration mismatch:

Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given, called in /home/itest/public_html/hermeneia6-7/sites/all/modules/statistics_filter.module on line 73 and defined in db_query() (line 2313 of /home/itest/public_html/hermeneia6-7/includes/database/database.inc).

#8

Thanks for the feedback.

The database query has to be rewritten anyway using db_delete, which might amend this issue.

#9

Thank you for your answer and work in providing this module even before to be released.

#10

Well, I should have read the error message more carefully. There was another query which I hadn't touched yet ...

And I finally managed to reproduce the error message ;-)

The new code should work but the query in question should be rewritten using db_update() which is still on my to-do list.

AttachmentSize
statistics_filter_7.x_1.0-dev.zip 11.47 KB

#11

Thank you but it doesn't work. There is no error anymore but the "administrator" account reads are still counted when a particular node is refreshed. The process I followed is that I uninstalled the previous version of the module, cleared the cache, installed the last one and performed update.php. But the counter is still registering. :(

#12

Please try the functionality with another role whether the module works at all because I have also tried the above mentioned change to using "db_delete" which might not work correctly.

The behavior of the administrator account (FKA "user 1") seems to have changed with D7 so better first test with a "normal" role. I will keep an eye on this issue and also on the strange fact that the module not only outputs an error message but a full node header.

Thanks for your contribution!

#13

Anytime.
Unfortunately it doesn't work with any other role. And I may add that I tried selecting to filter one role or one role + the authenticated user. Neither of these two options brought any results. The counter was raising as it was no filtering. Sorry.

#14

So the the db_delete() might still be buggy. I switched the code back to the original db_query(). Should work, but not tested yet.

AttachmentSize
statistics_filter_7.x_1.x-dev.zip 11.47 KB

#15

I tested it. There is no error but no filtering either. I tested it both with a normal role and the administrator role.

#16

Version:master» 7.x-1.x-dev
Assigned to:Anonymous» Frank Ralf

Please use the official dev release for further testing. I changed the database queries and the module does seem to work ok on my test installations.

#17

Thank you Frank!

Tested fine so far. Did quick ApacheBench tests for hundreds/thousands of hits and the figures add up :)

Impact speed wise of this filter module is negligible too.

Cheers!

#18

Thanks for testing! Will clean up the code and make this an official release soon.

#19

I tested the dev release and it works fine.

#20

Status:needs review» reviewed & tested by the community

Thanks for testing! Setting this to RTBC and will make it a stable release soon.

#21

Status:reviewed & tested by the community» closed (fixed)

Closing this as there's a first stable release out now. Please open a new issue if there's any problems.

nobody click here