News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Track User Activity Error (2.1.4)

Started by gdavison, March 27, 2024, 11:16:47 AM

Previous topic - Next topic

gdavison

Just updated our clubs forum from 2.0.19 to 2.1.4

Firstly would like to say many thanks to all the developers & testers who laid the foundations for what was a painless upgrade with no issues.

When playing around with features as Admin I tried the Track User > Activity (Which is found from members profile, profile info,

You cannot view this attachment.

however received an error

http://**nameofourforum**/index.php?action=profile;area=tracking;sa=activity;u=3
**somedirectoryinfo**/forum/Sources/Profile-View.php (Line 2101)

The text in between the *'s have been edited to be general

Type of error: Critical
Error message Select
Wrong value type sent to the database. IPv4 or IPv6 expected.(ip_list)
Function: trackActivity

Edit : tried doing the same query on my account and it works fine, error only occurs when checking other member profiles.  I did check that the user I was trying it on had logged on since the upgrade, just in case some data was not yet present etc

Any thoughts / comments / guidance would be great thanks

PHP is still 8.0 : database is MySQL 5.7
As our club is a target shooting club, the forum is not available to guests/public.


Kindred

Mods installed?

Are you using cloudflare or a proxy?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

gdavison

sorry was just coming back to put the mods info in ..

Mods loaded are only
Remove "Last Edit" version 1.2
Post as Another Member version 1.7

Forum is directly hosted in Germany on IONOS no use cloudflare or Proxy

Doug Heffernan

Did the error happen after the installation of the mods?

Quote from: gdavison on March 27, 2024, 11:36:15 AMMods loaded are only
Remove "Last Edit" version 1.2
Post as Another Member version 1.7

Quote from: gdavison on March 27, 2024, 11:16:47 AMJust updated our clubs forum from 2.0.19 to 2.1.4

Can you run this sql query at the SQL Tab of your phpmyadmin and post back the results?

SELECT * FROM `smf_messages` WHERE poster_ip='';
The reason that I am asking is that I think this might caused by some blank values for the poster_ip field at the smf_messages table.

gdavison

I only tried running the command after the mods went in if that helps

I had to run

SELECT * FROM `smf_1messages` WHERE poster_ip='';

as the previous admin had used smf_1 as the "header"

result was

You cannot view this attachment.

if I browse smf_1messages the entries do have data in them

You cannot view this attachment.

PS I do love the new inline picture function in 2.1  :)

However I think you are correct .. I remember that in my 2.0.X version of forum, those users on a IPV6 address's never got their address displayed correctly

gdavison

@Doug Heffernan I think your idea is correct .. Some entries have null data

You cannot view this attachment.

Doug Heffernan

#6
Quote from: gdavison on March 27, 2024, 12:02:18 PM@Doug Heffernan I think your idea is correct .. Some entries have null data

As I suspected. The blank/invalid entries are the cause of the issue. How many rows are there with the NULL value? If there aren't a lot, you can run a few queries to insert the correct ones. That is if you still have a backup of the 2.0.19 version.

Otherwise I think that this will require writing some code to fix the issue. 

gdavison

Quote from: Doug Heffernan on March 27, 2024, 12:17:04 PM
Quote from: gdavison on March 27, 2024, 12:02:18 PM@Doug Heffernan I think your idea is correct .. Some entries have null data

As I suspected. The blank/invalid entries are the cause of the issue. How many rowsare there with the NULL value? If there aren't a lot, you can run a few queries to insert the correct ones. That is if you still have a backup of the 2.0.19 version.

Otherwise I think that this will require writing some code to fix the issue. 

1023 lines from about 7000 lines have nulls in them

To be honest now I know what the cause is I am happy to live with it.  My wife is much better versed in sql / php so one day I may get her to run a few tidy up queries

Many thanks for the help in getting to the bottom of the issue

Doug Heffernan

Quote from: gdavison on March 27, 2024, 12:27:31 PMMany thanks for the help in getting to the bottom of the issue

No problem.

Aleksi "Lex" Kilpinen

It could be fairly easy to fix, by simply replacing every NULL with any known good value. Would not really be very useful data, but would stop the errors.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: