News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

getting database errors when posting or if attaching a picture .

Started by geminiman, May 06, 2022, 01:48:23 PM

Previous topic - Next topic

Kindred

OK...

as you know -- your sites are a real mess. :P

Specifically, the databases.
I have a backup of the original database, if anything seems to be wrong.

1- I dropped all the backup tables in the primary database. they were just cluttering things up at this point.

2- As I think I noticed last time -- you have two SMF installations inside your primary database. One with the standard prefix and another with a different prefix (your ACTUAL forum is using the non-standard prefix)

3- A whole bunch of tables (and by that, I mean 48) were still using latin1_swedish_ci collation.
I fixed these by resetting the entire DB to utf8_general_ci (new tables should now default to this) and running CONVERT on those 48 tables

4- Your missing english language file was due to a file from newsletter pro which was still being triggered by something.  I removed those old files and confirmed that the hooks, sources and templates were also removed.
If you still see errors related to a missing english file, let me know.

5- Your malformed JSON errors seem to be related to a partially installed/partially uninstalled mod and were triggered by the fix_packages file.   I did nothing for this, since it only triggers when you run it.

6- the field which was missing a default when you attempt to attach a picture -- was indeed missing a default.  I set the default value to NULL directly in the database.

7- Your database settings table was missing INSERT INTO `settings_tablename` (`variable`, `value`) VALUES
('global_character_set', 'UTF-8');

8- I cleared your error log. 785 error messages -- ALL of which were related to the issues notes in 3, 4, 5 and 6 above.

9- Test post successfully made in your admin section with an image attachment and a text file attachment


If you notice any weirdness with text in the forum, let me know - because it looks like your conversion to UTF8 was only PARTIALLY done. I completed it in the database... but converting content which was partially converted MIGHT lead to some odd characters in some cases.


Сл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."

geminiman

hi kindred thank you so much for all your hard work . i was at work and did not realize you had done the work until the other admin told me . so thank you .

yes sorry the old tech guys that looked after things from the start (before i was there ) and after that did make a mess , did not install the main site into a folder even , and it seemed did not clean up after them . in more recent years im doing the job all be it as you can see im far from an expert on this stuff . but i have the head to learn stuff . but seeing as we already has problems i did not want to make them worse , so i thought best to leave things pretty much as i and you found them . but yes the main site is a mess for sure in terms of how the files are on the host . and the database i knew had issues .

i did so i thought following instruction from doug convert to utf8 . i dont know how there are two smf versions in the database . but it may well explain why i changed settings in database and nothing worked . regarding number 6 that is another one , i set the field in question to null , i even dropped the field , to no avail .

but thank you so much kindred , for all your great help here , and not forgetting doug who helped me a lot also . i will be very careful moving forward now ,and i have advised the other admin also in this regard . but if any issues / strange errors arise i will of course get back to you guys here . and i will pop in here at times any way for info and updates and i will help out where i can , to give a bit back to this great forum . thanks guys

Doug Heffernan

Quote from: geminiman on June 22, 2022, 01:40:18 PMi did so i thought following instruction from doug convert to utf8 . i dont know how there are two smf versions in the database . but it may well explain why i changed settings in database and nothing worked .

It appeared that you were not editing the right database, as I suspected all along. For future reference, you can have multiple smf forums installed in the same database providing each has a different prefix. If you run into issues with any particular forum, you should look up the database prefix in the Settings.php file of that particular forum. And the tables prefaced by that prefix are the ones that you need to edit/modify.

A suggestion if I may, your forums/databases need a thorough checkup to clean them from all the stuff left behind by old and unused mods. The sooner you do it, the better.

Anyways, I am glad to see that @Kindred fixed this for you. I will mark this as solved.

Advertisement: