QUICK NEWS

{NEW} - A new css video is up.

{OLD} - New video courtesy of Skhilled, Thanks for posting it up.

Video of the moment:


Internal Links

SMF Sites

Quick Info

'buddyList' doesn't have a default value

Started by lesmond, Feb 27, 2023, 05:47 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

lesmond

Not been able to sort this one out :dontknow  :emb
Anyone have an idea please?

https://xxxxx .com/forums/index.php?action=register2
Database Error: Field 'buddyList' doesn't have a default value
File: /home/xxxx/public_html/forums/Sources/Subs-Members.php
Line: 771

The only person who got all his work done by Friday was Robinson Crusoe

Dave

Quote from: lesmond on Feb 27, 2023, 05:47 AMNot been able to sort this one out :dontknow  :emb
Anyone have an idea please?

https://xxxxx .com/forums/index.php?action=register2
Database Error: Field 'buddyList' doesn't have a default value
File: /home/xxxx/public_html/forums/Sources/Subs-Members.php
Line: 771

Firstly I know you know a fair bit about coding, so forgive me if the following is like teaching you to suck eggs  ;)

I know it shouldn't do it Les but have you tried creating a buddy on the forum and then remove them, maybe create an alias member as I do which I use to test that normal members can see what they're meant to.

Backup your database before the next step.

Failing that if you look at the attached snip of my 'buddy_list' column, you'll see that the default is 'None' check yours and if it isn't like that then go to your database, find 'smf_members' table then click on 'Structure' once you're there click on 'Change' and using the drop box change it to 'None', now click 'Save'

I hope that helps and works
If you want play quizzes or games click below

lesmond

I'm crap with db stuff, but your idea pointed me in the right direction, it was on 'none' but I clicked save anyway, it seems to have cleared the error.

 Thanks @Dave

The only person who got all his work done by Friday was Robinson Crusoe

Dave

Great news Les, glad it worked for you
If you want play quizzes or games click below

lesmond

Damn, they back again, spoke to soon   :dontknow

The only person who got all his work done by Friday was Robinson Crusoe

lesmond

Quote from: Dave on Feb 27, 2023, 07:32 AMI know it shouldn't do it Les but have you tried creating a buddy on the forum and then remove them, maybe create an alias member as I do which I use to test that normal members can see what they're meant to.

Ok tried this, will wait and see the results later  :rgton

The only person who got all his work done by Friday was Robinson Crusoe

Dave

If you want play quizzes or games click below

lesmond

Darn thing has not gone away  :dontknow  :o  At least it's the only error.

The only person who got all his work done by Friday was Robinson Crusoe

Dave

Quote from: lesmond on Feb 28, 2023, 03:09 AMDarn thing has not gone away  :dontknow  :o  At least it's the only error.

My only other suggestion Les would be to remove any mods you've got, one at a time, to see if that resolves it. Out of the box SMF doesn't do that so it must have been caused by a mod or your tinkering ;)
If you want play quizzes or games click below

lesmond


The only person who got all his work done by Friday was Robinson Crusoe

Dave

Quote from: lesmond on Feb 28, 2023, 03:14 AMSee My other post here https://www.smfhelper.com/index.php?topic=1262.0

Now reading that topic you say it's SMF2.0.19 is that correct? If so then check to see what version of PHP the host is using, as you know 2.0.19 doesn't like PHP8
If you want play quizzes or games click below

lesmond

Its my server  ;D  I put the site on php 7.4

The only person who got all his work done by Friday was Robinson Crusoe

Dave

Quote from: lesmond on Feb 28, 2023, 04:06 AMIts my server  ;D  I put the site on php 7.4

OK well it's not that then  :dontknow 
If you want play quizzes or games click below

Oldiesmann

If you're on MySQL 8.0.13 or later or MariaDB 10.2.1 or later, you can change the default value of that column to an empty string. Earlier versions of MySQL and MariaDB didn't allow default values for text columns, but if you say it's not null and don't specify a default value then you need to specifically tell MySQL/MariaDB what to insert into that column or it will complain.

Alternately you can edit the query in Subs-Members.php to make it specifically insert an empty string into that column.
Christian Metal Fans - https://www.christianmetal.fans

lesmond

Not sure if I did the right thing, but I checked 'Null' seems to have fixed the error so far :dontknow


The only person who got all his work done by Friday was Robinson Crusoe