*

katalin2k

  • ***
  • 65 posts
Admin listings views not working
« on: January 05, 2025, 05:04:56 PM »
In admin backend when I go to see all listings view count is not working: https://prnt.sc/wr_HZoi81FEj
I use latest OSC.

*

MB Themes

Re: Admin listings views not working
« Reply #1 on: January 08, 2025, 11:06:02 AM »
Views are not counted for users logged-in as admin.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

katalin2k

  • ***
  • 65 posts
Re: Admin listings views not working
« Reply #2 on: January 08, 2025, 09:08:42 PM »
I understand that but I also browse incognito to make tests and it seems that it doesn't count any of that also. As you can see in the attached image it shows 0 for all and some show 0x0x, which is very strange.

*

MB Themes

Re: Admin listings views not working
« Reply #3 on: January 11, 2025, 08:47:33 PM »
There could be some issue, try to debug osclass and see errors. Also database logs.

Check this section in oc-includes/osclass/controller/item.php

Code: [Select]
        if(!osc_is_admin_user_logged_in() && !($item['fk_i_user_id']!='' && $item['fk_i_user_id']==osc_logged_user_id())) {
          require_once(osc_lib_path() . 'osclass/user-agents.php');
          foreach($user_agents as $ua) {
            if(preg_match('|'.$ua.'|', Params::getServerParam('HTTP_USER_AGENT'))) {
              $mStats = new ItemStats();
              $mStats->increase('i_num_views', $item['pk_i_id']);
                break;

            }
          }
        }
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

katalin2k

  • ***
  • 65 posts
Re: Admin listings views not working
« Reply #4 on: January 13, 2025, 10:18:00 PM »
Mine looks like this:
Code: [Select]
        if(!osc_is_admin_user_logged_in() && !(osc_is_web_user_logged_in() && $item['fk_i_user_id'] == osc_logged_user_id())) {
          require_once(osc_lib_path() . 'osclass/user-agents.php');
          foreach($user_agents as $ua) {
            if(preg_match('|'.$ua.'|', Params::getServerParam('HTTP_USER_AGENT'))) {
              $mStats = new ItemStats();
              $mStats->increase('i_num_views', $item['pk_i_id']);
              break;
            }
          }
        }
I tried to replace with yours but I still get 0 views in backend for each listing. Frontend views work fine, the issue is in admin backend.

*

MB Themes

Re: Admin listings views not working
« Reply #5 on: January 21, 2025, 07:54:41 AM »
I have not told to replace, just pointed you where to look and debug.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

katalin2k

  • ***
  • 65 posts
Re: Admin listings views not working
« Reply #6 on: January 23, 2025, 08:30:17 PM »
Ok but I am not very experienced so I can’t make it work…

*

MB Themes

Re: Admin listings views not working
« Reply #7 on: January 27, 2025, 07:24:25 AM »
You should have tech person that can help you with such issues or look for developer.
Unfortunately, for open-source there is never dedicated support that would solve your specific issues.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

katalin2k

  • ***
  • 65 posts
Re: Admin listings views not working
« Reply #8 on: January 27, 2025, 08:52:35 PM »
You should have tech person that can help you with such issues or look for developer.
Unfortunately, for open-source there is never dedicated support that would solve your specific issues.
But this is a bug from osclass, don't you think some developer that helped build it should try and help me fix the issue?

*

MB Themes

Re: Admin listings views not working
« Reply #9 on: Yesterday at 09:48:52 PM »
No, as it looks like issue on your side (never seen anyone having such problem). You must debug by yourself.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots