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

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

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

                                     - R. Waters

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: