Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: w4rkr4f7 on May 12, 2015, 03:42:31 PM

Title: CreatePost-Notify.php and cron.php error
Post by: w4rkr4f7 on May 12, 2015, 03:42:31 PM
Using SMF 2.1 ,I have some errors in logs  :



Guest
Today at 22:38
Type of error: Critical
The database value you're trying to insert does not exist: topic
Function: execute
http://www./cron.php
File: /Sources/tasks/CreatePost-Notify.php
Line: 62


Guest
Today at 22:38
Type of error: Cron
8: unserialize(): Error at offset 108 of 652 bytes
http://www./cron.php
File: /cron.php
Line: 199
Title: Re: CreatePost-Notify.php and cron.php error
Post by: Illori on May 12, 2015, 03:54:55 PM
are you using the latest version of 2.1 off github?
Title: Re: CreatePost-Notify.php and cron.php error
Post by: w4rkr4f7 on May 12, 2015, 03:57:15 PM
Quote from: Illori on May 12, 2015, 03:54:55 PM
are you using the latest version of 2.1 off github?

yes I do
Title: Re: CreatePost-Notify.php and cron.php error
Post by: Antes on May 12, 2015, 03:57:47 PM
Its a known issue: https://github.com/SimpleMachines/SMF2.1/issues/2849 (https://github.com/SimpleMachines/SMF2.1/issues/2849)
Title: Re: CreatePost-Notify.php and cron.php error
Post by: w4rkr4f7 on May 12, 2015, 04:09:21 PM
how can I disable all notifications ?
Title: Re: CreatePost-Notify.php and cron.php error
Post by: w4rkr4f7 on May 13, 2015, 08:21:01 AM
can I create a database called topic to avoid that errors until a real fix will be available ?
Title: Re: CreatePost-Notify.php and cron.php error
Post by: w4rkr4f7 on May 13, 2015, 10:12:49 AM
Ok it seems I have not access to Edit function  but I have solved that errors myself:

in file Subs-Post.php

replace line
if ($msgOptions['send_notifications'] && $msgOptions['approved'])


with
if ($msgOptions['send_notifications'] && $msgOptions['approved'] && !$user_info['is_guest'])


No more errors in logs .