News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Wrong value type sent to the database. IPv4 or IPv6 expected.(ip_list)

Started by user58389239, June 05, 2023, 06:10:36 PM

Previous topic - Next topic

user58389239

Hi,

Attempting to view this page: Profile Info > Track User > Activity

We're getting this error:
Type of error: Critical

Wrong value type sent to the database. IPv4 or IPv6 expected.(ip_list)
Function: trackActivity

 /home/site/public_html/forum/Sources/Profile-View.php (Line 2101)
That line says:
'ip_list' => $ips,
This error seems to occur for any user, or at least the few different ones I tried

Kindred

You need to include several lines before that code line as well

What mods do you have installed? Because I can not trigger this error on a clean 2.0.13
Сл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."

Julius_2000

Quote from: user58389239 on June 05, 2023, 06:10:36 PMAttempting to view this page: Profile Info > Track User > Activity

I had the same issue recently. Question, have you, by any chance,  instaledl the new Spoiler mod?

user58389239

Sorry about that, here is the surrounding code. The only mod we have installed is Ultimate Menu.

Please note this is 2.1.3, not 2.0.X

2092:            // Get member ID's which are in messages...
2093:            $request = $smcFunc['db_query']('', '
2094:                SELECT DISTINCT mem.id_member
2095:                FROM {db_prefix}messages AS m
2096:                    INNER JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
2097:                WHERE m.poster_ip IN ({array_inet:ip_list})
2098:                    AND mem.id_member != {int:current_member}',
2099:                array(
2100:                    'current_member' => $memID,
==>2101:                    'ip_list' => $ips,
2102:                )
2103:            );

Julius_2000

Did this occur after you had installed the menu mod? Did you install and uninstall mods?

user58389239

I've had this Menu mod installed since upgrading to 2.1.3. I have not tried disabling it. I'm not convinced the Menu mod is the cause of this error, as a custom menu doesn't have anything to do with IPv4 / IPv6 or listing IPs on that page in the Admin.

Julius_2000

Well, I ask because in my case, the spoiler mod I mentioned above caused exactly that issue caused by a simple missing $txt string out of the box. I also had redundant, left-over code in one of the php files after uninstalling a mod once which even caused a blank page. Maybe you'd want to check the files and places this U-menu makes changes on.

Sir Osis of Liver

If you only have the one mod installed, upload a clean set of 2.1.3 files and see if it fixes the problem.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

user58389239

I have a clean install of 2.1.3 on Dev, with no packages, and I just verified that the same issue occurs with no mods installed.

Wonder if this is a bug with the display of IPv6 addresses?

Sir Osis of Liver

Unable to replicate this problem on clean core install or busy production forum.  Are you seeing ipv6 addresses in affected profiles?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters


Kindred

it sounds like something did not get completed during the upgrade...
Сл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."

user58389239

Yes, I did the upgrade from 2.0.19 (using Command Line Upgrade). Yes I can see IPv6 addresses various places on the forum.

Any idea on how I can manually fix this?

live627

Might be some blank or invalid entries in logged ip address fields in smf_messages. I'll prepare   some code which might fix the problem.


Panoulis64

Unfortunately, I just happened to see that I have the same problem.
I upgraded from 2.1.3 to 2.1.4.
This happens by clicking to see a member's activities, from their profile. If it's useful @live627

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

File /home/triglian/public_html/Sources/Profile-View.php
Line 2101
URL of the page generating the error  https://www.myforoum.gr/index.php?action=profile;area=tracking;sa=activity;u=282

Flashback information
#0 : smf_db_error_backtrace()
Called from /home/triglian/public_html/Sources/Subs-Db-mysql.php on line 311
#1 : smf_db_replacement__callback()
Called by unknown on line -1
#2 : preg_replace_callback()
Called from /home/triglian/public_html/Sources/Subs-Db-mysql.php on line 409
#3 : smf_db_query()
Call from /home/triglian/public_html/Sources/Profile-View.php on line 2101
#4 : trackActivity()
Called from /home/triglian/public_html/Sources/Profile-View.php on line 1920
#5 : tracking()
Called from /home/triglian/public_html/Sources/Profile.php on line 818
#6 : ModifyProfile()
Called from /home/triglian/public_html/index.php on line 184

Panoulis64

Has there been a solution to this problem or are we still waiting???
This is because I am also interested in its solution.

Steve

Quote from: live627 on June 07, 2023, 12:14:44 PMMight be some blank or invalid entries in logged ip address fields in smf_messages. I'll prepare   some code which might fix the problem.
Is this still needed?
DO NOT pm me for support!

Panoulis64

Quote from: Steve on July 05, 2023, 05:43:44 AM
Quote from: live627 on June 07, 2023, 12:14:44 PMMight be some blank or invalid entries in logged ip address fields in smf_messages. I'll prepare   some code which might fix the problem.
Is this still needed?

Yes thanks, I still have the problem

Steve

DO NOT pm me for support!

Advertisement: