HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Statistics and sign-on queries/issues

Hi,

I suspect I am missing something obvious in both cases but any advice would be welcome.

I have setup a simple Vanilla forum for a local parish council but statistics and sign-in aren't working as expected.

Stats
The number of views almost never increments. e.g. many of the discussions on http://yetminsterparishes.gov.uk/communityforums/categories/social-community-facilities show 1 view when the numbers should be far higher.
I have checked for Javascript errors in the console and HTML validation errors but can't find any.

Sign-In
Sign-in works but the page doesn't refresh so the user remains uncertain whether they are signed in as the sign-in and register options are still shown. Is this an expected behaviour?

Many thanks

Comments

  • rasteronrasteron forum.rastercode.com ✭✭

    hi @bansheetech ,looks like it was working before based on your previous topic views..

    http://yetminsterparishes.gov.uk/communityforums/discussion/3/use-of-the-village-hall

    You could check your sql/file permissions or track back what changes you have done before this issue occurred.

    vrijvlinder
  • rus bowdenrus bowden Lowell MA

    I am having the same problem with the number of views here: http://pochapocha.com/babilu2/

    Also, I just noticed that there is a "preview" button here. Why doesn't my Babilu forum have that?

  • @rus bowden said:
    I am having the same problem with the number of views here: http://pochapocha.com/babilu2/

    For the view counts to work, the php.ini setting magic_quotes_gpc has to be turned off.
    Create a .php file containing <?php phpinfo(); and check if the setting can be found there or contact your host.

    Also, I just noticed that there is a "preview" button here. Why doesn't my Babilu forum have that?

    It should be there. Maybe your theme hides it?

    hgtonight
  • rus bowdenrus bowden Lowell MA

    Thanks very much, Bleistivt, much appreciated.

  • That's a very good point @rasteron I will check through the change history, perhaps a template change caused a problem.

    @Bleistivt I will check that out as well. Thanks!

  • I've dug into this a little further but at the moment I'm stumped.

    The template file used in the customised theme does include the Foot asset and does have the AfterBody event.

    Enabling a base theme doesn't make any difference.

    I have checked the MySQL database and the view count never changes from any action.

    There aren't any Javascript errors.

    If I add a Trace call in the AddView function and enable debug output on the forum then the trace is not output. I have also tried a log file but nothing is logged for AddView so I can only assume the method isn't being called at all. I can only see a reference to AddView() in function in Gdn_Statistics_Tick_Handler class.hooks.php but cannot see where this function is being called from.

    I'm currently using version 2.0.18.8.

    Other than upgrading the forum early on very few changes were made between the view counts working and not working, I've tracked back through them all and can't see change that would affect any of the stats calls.

    Any pointers would be gratefully received!!

  • hgtonighthgtonight ∞ · New Moderator

    The statistics tick should only be called as an AJAX callback on the inform notification call, IIRC. Do you have any JS errors in your web console?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • No JS errors at all - that's the odd thing. No errors yet apparently no callback.

  • I have worked back through all of the changes I have made to the forum since installation and cannot see any issues.

    The forum was originally installed as version 2.0.18.8 then progressively updated to 2.1.9

    I have just tried a test blank installation as 2.0.18.8 - all views are counted correctly.
    The test forum has then been upgraded to 2.1.9 - the views are no longer counted.
    No other changes were made - blank install with the default theme and no code changes whatsoever other than upgrading to version 2.1.9

    Is there anything specific I should check?

  • hgtonighthgtonight ∞ · New Moderator

    Are you getting a tick to /inform/notifications?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • No I'm not, I'm only seeing a tick a call to settings/analyticks.json

    Thanks

  • hgtonighthgtonight ∞ · New Moderator

    What status code/response is that returning?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Sorry for the delay (short holiday).

    It's returning 200 OK.

    {"FormSaved":true,"DeliveryType":"VIEW","Data":"","InformMessages":[],"ErrorMessages":"","RedirectUrl":""}

  • hgtonighthgtonight ∞ · New Moderator

    I created a test account (hgtonight) and everything looks in order.

    How do you have the comment approval system set up?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • I can see your account and have approved your comment.

    Moderation is set to have all comments approved before posting.

    Thanks for your help investigating so far, much appreciated.

  • Found this old post while trying to follow up on statistics problems...

    The issue described here is likely something related to magic quotes. Check your php.ini file for all magic quote configs. I'd strong recommend making a backup of the file and then turning off all of the magic quote options. I had issues with view count until I did this:
    magic_quotes_gpc = Off

Sign In or Register to comment.