News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

creating a post with [img] issue

Started by john1974, July 18, 2013, 11:57:01 AM

Previous topic - Next topic

john1974

Quote from: john1974 on July 20, 2013, 09:19:55 AM
Quote from: MrPhil on July 19, 2013, 06:25:55 PM
Well, topic=16777236.0 is certainly a strange one. That's what, x00FFFFFF if I remember my old System 370 programming days. I doubt they really have 16.7 million topics. Could that number be so large as to trigger a database warning that it's out of bounds (exceeded the field max size)? Anyway, that smells like a conversion problem.

I think that topic number was one I renumbered because it caused an error.   You think in the old phpnuke database I should find anything related to that number and delete it and start a fresh install again then convert?  (don't remember if I tried that.)

Nevermind it doesn't exist in that database I just checked.

john1974

Just wanted to update (sorry for the bump.)  So I changed a couple things #1 id_msg to bigint from mediumint #2 id_topic from to bigint to medium int

So far I can post, and view the posts.  I will do some testing today to continue to see if all of my problems are fixed.

MrPhil

A mediumint (id_topic) is 3 bytes long, with a maximum value of 16777215. Your topic number should definitely trigger an error when it tries to store the data. My guess would be that phpnuke is using full sized (4 byte) ints and has one or more topics with an id larger than 3 bytes. Something went wrong with the conversion. Do you think it was just this one topic with a funky number (phpnuke handling as a full-sized 32 bit int?)? If so, renumber or delete it so SMF won't choke on it. If there are many such topic ids, that might not be practical. If the phpnuke ids are big, a possibililty would be to take the .sql backup and do something in an editor or script to detect all the oversize ids and change them to something in range of SMF. You would just have to be careful to 1) not create duplicates, and 2) change all instances of a given id to a new smaller id.

john1974

Quote from: MrPhil on July 20, 2013, 10:52:40 AM
A mediumint (id_topic) is 3 bytes long, with a maximum value of 16777215. Your topic number should definitely trigger an error when it tries to store the data. My guess would be that phpnuke is using full sized (4 byte) ints and has one or more topics with an id larger than 3 bytes. Something went wrong with the conversion. Do you think it was just this one topic with a funky number (phpnuke handling as a full-sized 32 bit int?)? If so, renumber or delete it so SMF won't choke on it. If there are many such topic ids, that might not be practical. If the phpnuke ids are big, a possibililty would be to take the .sql backup and do something in an editor or script to detect all the oversize ids and change them to something in range of SMF. You would just have to be careful to 1) not create duplicates, and 2) change all instances of a given id to a new smaller id.

Yes I did delete the topic id in question and so far I have been testing with a friend to see if we get any other errors or if the original error returns and I am happy to report the issue seems resolved.  I will mark this as resolved after another day of testing, but I do want to thank all of those who replied working to help my issue all of you where a big help in getting me to the point I was at to be able to figure it out (knock on wood.)

john1974

Just reporting back everything seems to be working good.  Thank everyone for all of the help it took almost 2 months to get this to work but we did it.

Marking resolved.  :)

Advertisement: