Hi, I have a Drupal 6.2 Site under costruction.
I have enabled the popular-content Block.
I ask if there can be a way to filter out the "Page not Found" visualisation from
the Popular-content Block.
The error setting page use equivalent selfmaded "Page not found" nodes.
Error 403 as ?q=node/1
Error 404 as ?q=node/2
site: http://www.adaccs.at/drupal2/
Cheers
Comments
Comment #1
Wolfflow commentedOf course it is not a solution but meanwhile you can do an sql query with "phpMyAdmin"
on your Drupal database:
Same procedure as for 1.
Of course it will show your "Page not Found" NID Number if you put the number of "reads" this
node have, then you can set it to 0 so that for a while it will not showup again in the "Popular Content" Block.
Cheers
Comment #2
Wolfflow commentedHi all,
I know that this seems not to care anyone, because most of you Drupalist sure have a PHP solution for that !!
But please let you share your solutions with us (no PHP programmers)
Thanks for your hints, and suggestions of documentation what can help me and others to implement a solution.
Cheers
Comment #3
Wolfflow commentedJust as a consideration:
It's possible to put an SQL Funtion call in the Statistic Module that on activation of the "Popular-content-Block" will check and reset the node_counter for the NID of the a cuastom "Page_not-found(Node)" and the NID for the custom "Forbidden(Page)" = 0 ?
Or can be the possibility to delete or disable the counting for those node_counter items?
Any help is very much appreciate
Comment #4
AstralP commentedWhy don't you just use views to build a block to what you require?
Views is perfect for that sort of task :)
EDIT:
Also your best bet is to look at what page not found errors you are getting and build some redirects for the highest ones in the .htaccess file (in the root of your site), that way you can redirect the links to what the user expects and keep people coming from that source.
Comment #5
Wolfflow commentedHi AstralP
If i was that expert with view maybe I have done it, i'm not, and I consider that such a Kind of Bug that is in the
statistical.modul should really be taken in consideration despite the fact that if i give Drupal user the option to
get a custom "Page-not_found" page and a "Forbidden" page in the Drupal administrative settings I should consider that
in the statistic.module wich is Core this event is taken in consideration!
Cheers
Comment #6
gpk commentedThe following code if put in a block will give you the All time popular content *excluding* any 403 or 404 pages that have been defined. This is largely cribbed from http://api.drupal.org/api/function/statistics_block/6 and http://api.drupal.org/api/function/statistics_title_list/6.
I agree that something like this should be built-in, probably in core.
Comment #7
Wolfflow commentedHi GPK, first that you very much for your cool support.
Very much appraciate and I'm going to implement it right now.
And yes , I know there are some discussions from the core team that this myght be solved or at
list taken in considerationfor the next Drupal release. I hope it will be in the 6.x upgrade version
but surely in version 7. Thank a lot. I let you know.
Cheers
P.S. everything fine on my HP (thanks again)
Comment #8
Wolfflow commentedHi, am here again shortly for a question: Can this be applyed on Drupal version 5.7 too?
I defenitly suppose no, am I right?
Cheers
Comment #9
pcs305 commentedI'm also interested in a 5.7 version.
(I did try it in 5.7 but it did not work)
Comment #10
gpk commentedThis was written on 5.x, should also work on 6.x. :)
Comment #11
blucky commentedThere was a bug at Drupal 5.7 and panel2. It was broke my panel down, maybe you want to take a look for a while. It's working nicely on regular block. Btw how to hidden restricted content type at popular content?
Comment #12
dave reidYou can use the Statistics Advanced settings to not allow 403 and 404's to be included in node_counter. Considering that the module is in a semi-abandoned (looking for adoption), should this maybe get marked won't fix since there is a solution provided in another (very similar) module?
Comment #13
gpk commentedI suspect Views can also do most if not everything that Statistics Filtering can (and probably much more flexibly), at least in 6.x.
Comment #14
Wolfflow commentedI am still following this issue.
I did not try the code posted in #6 by gpk,
maybe some one did or anyone have a better idea?
Comment #15
frank ralf commentedI'm not sure whether this use case should be handled by this module.
Comment #16
Wolfflow commentedAs the site mentioned in the issue does not exist anymore and because as of Drupal Version 6 and 7 we have many valuable features to deal with statistic module settings I close this issue. Please feel free to reopen if you mind. Thanks to all poster.