Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Vlado202 on November 22, 2022, 05:43:39 PM

Title: 'Convert to MEDIUMTEXT' doesn't work as of SMF 2.1.3
Post by: Vlado202 on November 22, 2022, 05:43:39 PM
Before 2.1.3. when I went to Forum Maintenance and clicked the "Run task now" button under "Convert to MEDIUMTEXT it worked perfectly, but after I updated my forum I just get this error popping up:
QuoteInvalid default value for 'body'
File: /home/u*********/domains/placeholder.com/public_html/community/Sources/ManageMaintenance.php
Line: 365

(I of course removed some private information from the File Path & replaced it with placeholders, but should be clear enough...)..

And I don't know how to fix it without reverting back to an older version.

I also tried changing the value 'body' in the ManageMaintenance.php file, in that case it says it has completed the conversion, but when I try and set my max character number per post to unlimited (0) it still says that my DB isn't configured / isn't converted to MEDIUMTEXT..
Title: Re: 'Convert to MEDIUMTEXT' doesn't work as of SMF 2.1.3
Post by: vbgamer45 on November 22, 2022, 06:04:55 PM
Have you tried changing the value using a database tool such as phpmyadmin?
Title: Re: 'Convert to MEDIUMTEXT' doesn't work as of SMF 2.1.3
Post by: shawnb61 on November 22, 2022, 06:23:26 PM
This is a valid bug.

Logged: https://github.com/SimpleMachines/SMF/issues/7627

You should only need to do this function once ever per forum.  I would suggest doing this in a tool like phpmyadmin. 

The following should work:
ALTER TABLE smf_messages CHANGE COLUMN `body` `body` mediumtext NOT NULL
Title: Re: 'Convert to MEDIUMTEXT' doesn't work as of SMF 2.1.3
Post by: Vlado202 on November 23, 2022, 03:24:56 PM
Yes, it did indeed fix it and is now working perfectly!

Thanks!
Title: Re: 'Convert to MEDIUMTEXT' doesn't work as of SMF 2.1.3
Post by: [chrisB] on December 12, 2022, 01:01:44 PM
Thank you, @shawnb61

I thought I had done something wrong when I couldn't run the tool inside the admin panel.