News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

The database value you're trying to insert does not exist: id_member

Started by LuciferMorningstar, November 12, 2023, 07:01:49 AM

Previous topic - Next topic

LuciferMorningstar

Hello,
today I'm receiving many critical errors.

The error is always the same: "The database value you're trying to insert does not exist: id_member
Function: logActions"

I never made changes to my db.
I only make a backup of it every night at 23:00

My SMF version is 2.1.4, I use "Fusion theme" (customized) and I installed these mods:

You cannot view this attachment.

"Avatars Display Integration" is not installed.


Steve

My pet rock is not feeling well. I think it's stoned.

LuciferMorningstar

Quote from: Steve on November 12, 2023, 07:29:33 AMDo you get the errors when using the default theme?
I don't know.
I never use the default theme.
I do not want to change it.

LuciferMorningstar

It doesn't stop to send me this message.
I'm receveing this message every minute!

LuciferMorningstar

The error is also accompanied by this other one.

You cannot view this attachment.

Sir Osis of Liver

When in Emor, do as the Snamors.
                              - D. Lister


LuciferMorningstar

I noticed these errors after I opened a hidden category to visitors with a section.  I also created an on-demand group for users to see this category and access it.

Doug Heffernan

Quote from: LuciferMorningstar on November 12, 2023, 07:01:49 AMMy SMF version is 2.1.4, I use "Fusion theme" (customized) and I installed these mods:

What was the latest mod that you installed before the error happened? Can you uninstall the mods one by one and see if the error will stop? That is to rule them out as being the culprit.


Sir Osis of Liver

Quote from: LuciferMorningstar on November 12, 2023, 12:47:49 PM
Quote from: Sir Osis of Liver on November 12, 2023, 12:24:54 PMTry repairing members table.

How can I repair members table?

Use phpmyadmin, but don't think that will fix it.  Do what Doug suggested and uninstall mods.  In worst case you can upload clean files.
When in Emor, do as the Snamors.
                              - D. Lister

LuciferMorningstar

Quote from: Doug Heffernan on November 12, 2023, 01:06:40 PM
Quote from: LuciferMorningstar on November 12, 2023, 07:01:49 AMMy SMF version is 2.1.4, I use "Fusion theme" (customized) and I installed these mods:

What was the latest mod that you installed before the error happened? Can you uninstall the mods one by one and see if the error will stop? That is to rule them out as being the culprit.


I noticed that the same errors appear also in my local forum.
In order not to make changes to my public forum, I tried uninstalling all the mods, one by one, to see if the errors continued to appear but the problem continued to persist even when I had uninstalled all the mods.
The only way to not have the errors was to import an old version of the database from 6 days ago, then I installed the mods, one by one and I no longer had this problem.
Unfortunately it is not convenient for me to import an old database from one or two days earlier even on the public forum because in the meantime I have added new groups and sections; Furthermore, users have added new messages.
I really don't know how to get rid of these annoying error messages anymore.
Also I tried to repair the tables via phpmyadmin but I always get this error: "The storage engine for the table doesn't support repair".

Kindred

Well, it seems that something that you did in those few days caused something to break.

Since we don't know exactly what you did,  we are going to have a hard time helping you fix it
Сл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."

LuciferMorningstar

Other than installing mods, opening a new hidden section and adding a new user group to the forum, I don't remember doing anything else.
I also repeated these actions in my local forum, which now no longer shows error messages.
Perhaps these additional details will be useful to you?

You cannot view this attachment.

You cannot view this attachment.

Kindred

oh, hey - look at that URL...   it's doubled (see the https AFTER the index.php


that's wrong.   That means that you have something configured badly in your system
Сл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."

LuciferMorningstar

Quote from: Kindred on November 13, 2023, 11:24:26 AMoh, hey - look at that URL...  it's doubled (see the https AFTER the index.php


that's wrong.  That means that you have something configured badly in your system
I don't know what's configured wrong. I checked the settings.php and settings_bak.php files and they seem fine.
Using phpmyadmin I changed the 127.0.0.1/localhost links to my domain, on all those tables that the search found.
I didn't find anything duplicated.
It's strange.

Doug Heffernan

Quote from: LuciferMorningstar on November 13, 2023, 01:12:10 PMUsing phpmyadmin I changed the 127.0.0.1/localhost links to my domain, on all those tables that the search found.

For future reference, it is best to not change the paths/urls directly in the database, but use the repair_settings.php tool for that instead.

Kindred

so, what is the current setting for those fields if you look in the smf admin or in repair_settings?

the EXACT setting...
Сл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."

LuciferMorningstar

You cannot view this attachment.

You cannot view this attachment.

Kindred

Those settings look correct.

That means that a modification has broken your url builder function
Сл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."

LuciferMorningstar

Quote from: Kindred on November 13, 2023, 06:20:06 PMThose settings look correct.

That means that a modification has broken your url builder function
How can I fix my url builder function, please?
Tell me if you need more details.
I cannot import an old database for the reasons I have already mentioned.
Furthermore, in the meantime, other users have registered.
All in all, the forum seems to continue to perform well. 
People are able to register, log in and write. 
I just wish these error messages would disappear. 
However, some users complain that the shoutbox lags while they write and that this delay makes them write incorrectly. 
It's strange, because it never happens to me.
However, I fear that this last problem existed even before these error messages appeared.

LuciferMorningstar

Is there anyone who can help me?
I'm sure the problem lies with the database tables but I don't know anything about programming.
Even the hosting service I use allows you to "repair the database" but doing so doesn't change anything.

Sir Osis of Liver

When in Emor, do as the Snamors.
                              - D. Lister

shawnb61

Do you have any entries in the background_tasks table?


Note: The 'database value does not exist' message often refers to a bad call to smcFunc - not an actual DB issue.

This looks like some notifications were going to be sent out, but ran into an error.  Now, cron keeps trying to reprocess that background task. 

So...  If there is a persistent background task trying to send out notifications, that doesn't go away, my first suggestion is to delete that background task from the background_tasks table.
A question worth asking is born in experience & driven by necessity. - Fripp

LuciferMorningstar

Quote from: shawnb61 on November 15, 2023, 02:29:53 PMDo you have any entries in the background_tasks table?


Note: The 'database value does not exist' message often refers to a bad call to smcFunc - not an actual DB issue.

This looks like some notifications were going to be sent out, but ran into an error.  Now, cron keeps trying to reprocess that background task. 

So...  If there is a persistent background task trying to send out notifications, that doesn't go away, my first suggestion is to delete that background task from the background_tasks table.
Forgive my ignorance but I'm not familiar with these things.
Would the "queries" be these entries in the table?



They also have an ID: 300, 308, 310 and so on.
Now, should I delete them all?

shawnb61

If you are still getting those errors, yes, delete them all.

I expect the errors to go away..

The question is whether they come back...  Those notification requests were (are?) being built incorrectly somehow.
A question worth asking is born in experience & driven by necessity. - Fripp

LuciferMorningstar

Quote from: shawnb61 on November 18, 2023, 10:49:24 AMIf you are still getting those errors, yes, delete them all.

I expect the errors to go away..

The question is whether they come back...  Those notification requests were (are?) being built incorrectly somehow.
By deleting those queries the problem was solved and never recurred.
A thousand thanks.
I hope it doesn't show up again in the future.
I wonder how it happened though.
Well for now I think I can mark the discussion as resolved.

Helgi

This one helped me too.

It would be nice to add this to the FAQ:

QuoteIf so many errors like
"The database value you're trying to insert does not exist: id_member
Function: logActions"
Needs to be cleared table background_tasks

KittyGalore

Quote from: Helgi on June 29, 2024, 11:05:01 AMThis one helped me too.

It would be nice to add this to the FAQ:

QuoteIf so many errors like
"The database value you're trying to insert does not exist: id_member
Function: logActions"
Needs to be cleared table background_tasks
I too was getting these errors but thought i read it might be a bug somewhere.
SMF Curve 2.0x

shawnb61

It's definitely a bug.

The problem is being able to reproduce it.  What sequence of steps caused it to happen in the first place.  New board?  Split topic?  Moving a board?  Membergroup maintenance? 
A question worth asking is born in experience & driven by necessity. - Fripp

KittyGalore

Quote from: shawnb61 on June 29, 2024, 11:48:50 AMIt's definitely a bug.

The problem is being able to reproduce it.  What sequence of steps caused it to happen in the first place.  New board?  Split topic?  Moving a board?  Membergroup maintenance? 
Don't know will see if it comes back again i also did what was suggested here for now it stops appearing.
SMF Curve 2.0x

Helgi

Quote from: shawnb61 on June 29, 2024, 11:48:50 AMWhat sequence of steps caused it to happen in the first place.   
In my case this lasted for several months. In one day, 1000 points of this error could accumulate.

Maybe the background_tasks dump will clear things up:

(634316,'$sourcedir/tasks/GroupAct-Notify.php','GroupAct_Notify_Background','{\"member_id\":1,\"member_ip\":\"85.11.132.17\",\"request_list\":[\"1\"],\"status\":\"approve\",\"reason\":\"\",\"time\":1712257364}',1719622607),
(637193,'$sourcedir/tasks/GroupAct-Notify.php','GroupAct_Notify_Background','{\"member_id\":178653,\"member_ip\":\"145.91.119.1\",\"request_list\":[\"2\",\"3\"],\"status\":\"approve\",\"reason\":\"\",\"time\":1712481527}',1719622644),
(637376,'$sourcedir/tasks/GroupAct-Notify.php','GroupAct_Notify_Background','{\"member_id\":1,\"member_ip\":\"85.11.132.17\",\"request_list\":[\"4\"],\"status\":\"approve\",\"reason\":\"\",\"time\":1712497763}',1719622664),
(638168,'$sourcedir/tasks/GroupAct-Notify.php','GroupAct_Notify_Background','{\"member_id\":1,\"member_ip\":\"85.11.132.17\",\"request_list\":[\"5\"],\"status\":\"approve\",\"reason\":\"\",\"time\":1712578925}',1719622673),
(641197,'$sourcedir/tasks/GroupAct-Notify.php','GroupAct_Notify_Background','{\"member_id\":1,\"member_ip\":\"85.11.132.17\",\"request_list\":[\"6\",\"7\"],\"status\":\"approve\",\"reason\":\"\",\"time\":1712754203}',1719622702);

shawnb61

A question worth asking is born in experience & driven by necessity. - Fripp

Advertisement: