DB Error and SMF Not Recognizing Current Version

Started by Greyhound, April 23, 2023, 08:43:23 AM

Previous topic - Next topic

Greyhound

I noticed the below error from this morning @ 2:19am. 

The database value you're trying to insert does not exist: smiley_set
Function: parsesmileys

Additionally, for some reason the forum also is not recognizing the current version of software.  

Version Information:
Forum version: SMF 2.1.3
Current SMF version: [object HTMLElement]

I am on 2.1.3.  

Ideas on what's going on?  

Kindred

The current version thing is due to an issue with our servers here...

The other... what was the triggering url and the rest of the error message?
Сл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."

Greyhound

I think this is what you're looking for. 

call_integration_hook('integrate_smileys', array(&$smileyPregSearch, &$smileyPregReplacements));
3878:   
3879:        // If smileyPregSearch hasn't been set, do it now.
3880:        if (empty($smileyPregSearch))
3881:        {
3882:            // Cache for longer when customized smiley codes aren't enabled
3883:            $cache_time = empty($modSettings['smiley_enable']) ? 7200 : 480;
3884:   
3885:            // Load the smileys in reverse order by length so they don't get parsed incorrectly.
3886:            if (($temp = cache_get_data('parsing_smileys_' . $user_info['smiley_set'], $cache_time)) == null)
3887:            {
3888:                $result = $smcFunc['db_query']('', '
3889:                    SELECT s.code, f.filename, s.description
3890:                    FROM {db_prefix}smileys AS s
3891:                        JOIN {db_prefix}smiley_files AS f ON (s.id_smiley = f.id_smiley)
3892:                    WHERE f.smiley_set = {string:smiley_set}' . (empty($modSettings['smiley_enable']) ? '
3893:                        AND s.code IN ({array_string:default_codes})' : '') . '
3894:                    ORDER BY LENGTH(s.code) DESC',
3895:                    array(
3896:                        'default_codes' => array('>:D', ':D', '::)', '>:(', ':))', ':)', ';)', ';D', ':(', ':o', '8)', ':P', '???', ':-[', ':-X', ':-*', ':\'(', ':-\\', '^-^', 'O0', 'C:-)', 'O:-)'),
==>3897:                        'smiley_set' => $user_info['smiley_set'],
3898:                    )
3899:                );
3900:                $smileysfrom = array();
3901:                $smileysto = array();
3902:                $smileysdescs = array();
3903:                while ($row = $smcFunc['db_fetch_assoc']($result))
3904:                {
3905:                    $smileysfrom[] = $row['code'];
3906:                    $smileysto[] = $smcFunc['htmlspecialchars']($row['filename']);
3907:                    $smileysdescs[] = !empty($txt['icon_' . strtolower($row['description'])]) ? $txt['icon_' . strtolower($row['description'])] : $row['description'];
3908:                }
3909:                $smcFunc['db_free_result']($result);
3910:   
3911:                cache_put_data('parsing_smileys_' . $user_info['smiley_set'], array($smileysfrom, $smileysto, $smileysdescs), $cache_time);
3912:            }
3913:            else
3914:                list ($smileysfrom, $smileysto, $smileysdescs) = $temp;
3915:   
3916:            // The non-breaking-space is a complex thing...
3917:            $non_breaking_space = $context['utf8'] ? '\x{A0}' : '\xA0';

Arantor

Not exactly, the question was asked what URL you were on - because that's relevant for why that piece of code doesn't get the values it needs, specifically why $user_info['smiley_set'] isn't set up properly.
Holder of controversial views, all of which my own.


Greyhound



Arantor

He said in the OP he was on 2.1.3. In any case that bug relates to the cron, not the scheduled tasks.

If you check the scheduled tasks log, what task ran at the same time as the error?
Holder of controversial views, all of which my own.


Greyhound

Nothing in the tasks log shows it ran at the same time as the error.  In the code of the error seems like it may have been a birthday notify? 

Arantor

I'm not sure how you arrived at that from the information given.

The error as listed is a generic failure to do some bbc parsing, triggered from a scheduled task.

Now, birthday notify *is* a task but it triggers a different task which *isn't* handled by the scheduled tasks system. Which is specifically the URL you pointed out... so either you have more information than you've shared or it's not that...
Holder of controversial views, all of which my own.


Greyhound

I was looking at the wrong error.  There were two. 

Looks like the main error was 

'smiley_set' => $user_info['smiley_set'],

Arantor

We already know this is the line that's at fault - that's evident from what you did outline, that some point a scheduled task calls for bbc parsing, and fails because the current user's smiley set isn't known (because the scheduled task doesn't have a current user)

My questions are about trying to find which bbcode that is and making sure the correct setup is done for it...
Holder of controversial views, all of which my own.


Greyhound

There were no posts or tasks at the same time as this so error so I can't provide examples.  I had two errors both at 2:39am this morning (Eastern Time).    I can't tie the error to anything as was asked previously. 

Greyhound

I also got this error at the same time:  https://www.simplemachines.org/community/index.php?topic=585695.0

That error was listed as being SMF server related so maybe they both are.   

Arantor

No, they're really not. The one about the Fetch SM Files is not related to the smileys error you reported.

-sigh- I'm sorry, I can't help you.
Holder of controversial views, all of which my own.


Kindred

Instead of posting bits and pieces, please post what I asked for.

Please post THE ENTIRE error message. Don't post just one line, don't post code. Post the entire message as displayed in your error log
Сл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."

Cypheros

Same here.

First error:

https://myforum.de/forum_ger/index.php?PHPSESSID=f36462fe41b4dd9dcb1d6bf76c12eafa&?scheduled=task;ts=1682277540 [nofollow]
/...forum_folder.../Sources/Subs.php (Zeile 3897)

The database value you're trying to insert does not exist: smiley_set
Function: parsesmileys



Second one:

https://myforum.de/forum_ger/index.php?PHPSESSID=f36462fe41b4dd9dcb1d6bf76c12eafa&?scheduled=task;ts=1682277540 [nofollow]
/...forum_folder.../Sources/ScheduledTasks.php (Zeile 1109)

Database error: Data too long for column 'data' at row 1

DeadMan...

I tell it how I see it... Don't like it? Hit Alt+F4!

Cypheros

#17
Looks like some kind of hacking attempt.

Two days at the same time.

Sir Osis of Liver

No, it's not a hack. ::)  You didn't include timestamps with error messages, but work was being done on server stack over past couple of days that may have caused some db errors.  Are you still logging errors?
When in Emor, do as the Snamors.
                              - D. Lister

DeadMan...

I tell it how I see it... Don't like it? Hit Alt+F4!

Advertisement: