Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
theme itself
subscribe
Comment | File | Size | Author |
---|---|---|---|
#14 | statistics_filter_7.x_1.x-dev.zip | 11.47 KB | Frank Ralf |
#10 | statistics_filter_7.x_1.0-dev.zip | 11.47 KB | Frank Ralf |
#6 | statistics_filter_7.x_1.0-dev.zip | 11.32 KB | Frank Ralf |
#5 | error_stats_filter.JPG | 81.59 KB | Virgil |
#1 | statistics_filter_7.x-dev.zip | 11.56 KB | Frank Ralf |
Comments
Comment #1
Frank Ralf CreditAttribution: Frank Ralf commentedHere'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.
Comment #2
Virgil CreditAttribution: Virgil commentedHi,
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.
Comment #3
Frank Ralf CreditAttribution: Frank Ralf commentedThanks for testing and the feedback. Will look into this as soon as I find the time.
Comment #4
Frank Ralf CreditAttribution: Frank Ralf commentedI 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.
Comment #5
Virgil CreditAttribution: Virgil commentedThank 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.
Comment #6
Frank Ralf CreditAttribution: Frank Ralf commentedThanks 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.
Comment #7
Virgil CreditAttribution: Virgil commentedHi 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).
Comment #8
Frank Ralf CreditAttribution: Frank Ralf commentedThanks for the feedback.
The database query has to be rewritten anyway using db_delete, which might amend this issue.
Comment #9
Virgil CreditAttribution: Virgil commentedThank you for your answer and work in providing this module even before to be released.
Comment #10
Frank Ralf CreditAttribution: Frank Ralf commentedWell, 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.
Comment #11
Virgil CreditAttribution: Virgil commentedThank 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. :(
Comment #12
Frank Ralf CreditAttribution: Frank Ralf commentedPlease 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!
Comment #13
Virgil CreditAttribution: Virgil commentedAnytime.
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.
Comment #14
Frank Ralf CreditAttribution: Frank Ralf commentedSo the the db_delete() might still be buggy. I switched the code back to the original db_query(). Should work, but not tested yet.
Comment #15
Virgil CreditAttribution: Virgil commentedI tested it. There is no error but no filtering either. I tested it both with a normal role and the administrator role.
Comment #16
Frank Ralf CreditAttribution: Frank Ralf commentedPlease 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.
Comment #17
Tim Jones Toronto CreditAttribution: Tim Jones Toronto commentedThank 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!
Comment #18
Frank Ralf CreditAttribution: Frank Ralf commentedThanks for testing! Will clean up the code and make this an official release soon.
Comment #19
Virgil CreditAttribution: Virgil commentedI tested the dev release and it works fine.
Comment #20
Frank Ralf CreditAttribution: Frank Ralf commentedThanks for testing! Setting this to RTBC and will make it a stable release soon.
Comment #21
Frank Ralf CreditAttribution: Frank Ralf commentedClosing this as there's a first stable release out now. Please open a new issue if there's any problems.