Jump to content

PageViewStatistic for ProcessWire


tcnet
 Share

Recommended Posts

  • 2 months later...

I have an issue

ProcessModule: Module “ProcessPageViewStat” exists in database but not on the file system. Consider placing the module files in /site/modules/ProcessPageViewStat/ or removing the module from the database.
 
But whether I delete it from the database or add the module folder to the modules folder, in both cases I get:
 
Hmm… Fatal Error: Uncaught Error: Call to a member function render() on null in wire/modules/Process/ProcessModule/ProcessModule.module:995
 
And can't do anything else anymore…
 

What to do? I'm lost…

Link to comment
Share on other sites

3 minutes ago, fruid said:

I have an issue

ProcessModule: Module “ProcessPageViewStat” exists in database but not on the file system. Consider placing the module files in /site/modules/ProcessPageViewStat/ or removing the module from the database.
 
But whether I delete it from the database or add the module folder to the modules folder, in both cases I get:
 
Hmm… Fatal Error: Uncaught Error: Call to a member function render() on null in wire/modules/Process/ProcessModule/ProcessModule.module:995
 
And can't do anything else anymore…
 

What to do? I'm lost…

This is not related to the module it's self. Therefore no support here.

  • Like 1
Link to comment
Share on other sites

4 minutes ago, fruid said:

Yes, my bad, It happened because I downgraded to an older version of ProcessWire unintentionally when moving things around.

Cheers

Try the "Refresh" button on the module page. Maybe it will fix your problems.

Link to comment
Share on other sites

  • 8 months later...

Couple of issues with this module, which I can't post on Github because there's no issues page for the repo:

1. In its current state it throws errors with PHP 8.2 (ProcessPageViewStat.module lines 447 and 448) - it should check if these array elements exist before assigning them.

2. I'm unable to select text on its admin page unless I disable JavaScript. Looks like code in func/javascript.php is preventing this. 

Will a fixed release be available at some point? Thanks. I'm running version 1.2.3 which I believe is the latest.

Link to comment
Share on other sites

27 minutes ago, DrewPH said:

Couple of issues with this module, which I can't post on Github because there's no issues page for the repo:

1. In its current state it throws errors with PHP 8.2 (ProcessPageViewStat.module lines 447 and 448) - it should check if these array elements exist before assigning them.

2. I'm unable to select text on its admin page unless I disable JavaScript. Looks like code in func/javascript.php is preventing this. 

Will a fixed release be available at some point? Thanks. I'm running version 1.2.3 which I believe is the latest.

1. With which IP-address you call this page? Is this IP-address in the current IP2LOCATION https://www.ip2location.com/ database? Is the database in the module updated in the last few weeks? The IP-address has a "countryName" and "countryCode"? Do you have DEBUG-Mode deactivated as recommended in production mode?

2. The javascript contains nothing which prevents text selection. Please have a look in the developer console of your browser. Also deactivate "Record admin template".

Link to comment
Share on other sites

1. Localhost and some IPv6 addresses. So the IP address doesn't have a countryName or countryCode - that's the error I was getting. My reason for reporting is that the module should check whether these elements exist in order to eliminate the possibility of these errors. My fix on my local installation is this:

        $country_name = isset($temp_records['countryName']) ? $temp_records['countryName'] : ''; 
        $country_image = isset($temp_records['countryCode']) ? strtolower($temp_records['countryCode']) : ''; 
 

2. After further checking, it's not javascript.php that causes this (apologies!). It's dragscroll.js. If I prevent the module loading that script, text selection works. From the dragscroll.js Github page:

Quote

Keep in mind that now it is not possible to select the content with mouse

It goes on to explain how to preserve text selection by excluding children from the dragscroll behaviour

Edited by DrewPH
Link to comment
Share on other sites

1. Usually is hasn't to be checked because "countryName" and "countryCode" is always "-" if not found in the database. You can check that: https://www.ip2location.com/demo/127.0.0.1 If the elements not exists there might be something wrong with your IP2LOCATION-database. Please provide the complete error message.

2. DragScroll is a very useful feature on a computer without touch screen. I don't know what you want select/copy there. You can right-click on a link and then do "Copy link". There is nothing else to copy except the time. But it's up to you to comment it out in line 744.

Link to comment
Share on other sites

The elements countryName and countryCode not exists if the database was requested to lookup for an empty IP-address. But function get_ip() returns ALWAYS an IP-address, even if REMOTE_ADDR is not available. So I guess you modified function get_ip().

Link to comment
Share on other sites

31 minutes ago, tcnet said:

So I guess you modified function get_ip().

Nope. No mods whatsoever. Screenshots are attached showing the errors. Backend and frontend. Looks like the whole $temp_records array is false.

This is running on localhost. REMOTE_ADDR is ::1. PHP is 8.2.23.

Screenshot 2024-09-10 at 18.26.07.png

Screenshot 2024-09-10 at 18.26.35.png

Edited by DrewPH
Explaining temp_records array false
Link to comment
Share on other sites

OK, great, thanks, I'll check it out.

I'd still recommend tweaking your dragscroll config so that text can be selected with the mouse. Developers hate being prevented from doing that, and dragscroll doesn't seem to work on my browser anyway (Brave Mac latest). I'm not sure why it is included to be honest - can you clarify?

Link to comment
Share on other sites

1 minute ago, DrewPH said:

OK, great, thanks, I'll check it out.

I'd still recommend tweaking your dragscroll config so that text can be selected with the mouse. Developers hate being prevented from doing that, and dragscroll doesn't seem to work on my browser anyway (Brave Mac latest). I'm not sure why it is included to be honest - can you clarify?

But you can select the whole line. You just have to start selection very left side.

Link to comment
Share on other sites

17 minutes ago, tcnet said:

But you can select the whole line. You just have to start selection very left side.

Not on my browser. If I do that, I either get nothing, or the whole content from the top of the table. Nothing in between. 

But as I say, text selection with mouse is just one of those UI things that shouldn't be messed with, like scrollbar behaviour.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...