Driven 2 Services
June 12 in Technical Problems
I've run into an issue with SMF imports.
I do one import from an SMF database. Works.
Then I do a 2nd import from another SMF database. During the post rebuild, the following error is thrown:
TypeError: Unsupported operand types: string - string (0)
We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section.
We look forward to further assisting you.
I'll need to get back to you on that after this conversion. I couldn't wait, and moved on to a work around, so the SMF import session is no longer in the Invision install.
After this conversion I'll see about replicating it and making that available to you. I would take time to setup access, since the development server would need firewall changes, and an additional account setup with access to the development area access.
I did take a look at the code, nothing immediately stood out to me that could cause this. Please do let us know if you can reproduce it again.
I think I narrowed it down to bad source data because I initially had to set sql_mode to compatibility mode, or the imports failed early on. I fixed that, but I would not be surprised by other source problems.
For example, this particular db is using Latin1, but also has UTF8MB4 characters in it - so most posts convert properly but there's the occasional post with mangled characters. Any attempt to use character set conversion queries or Invision's tools to fix those, ends up mangling the others. If Latin1 is used during import, one set of posts ends up with mangled characters, if UTF8MB4 is used then another set gets mangled. A solution was importing Latin1 followed by a a set of find/replace queries - not how I'd do it if I had all the time in world - but it covered 99.9% of the instances so good enough.
It doesn't help that the SMF files are an earlier version than the SMF database is! (I've seen worse though)
I would say bad source data is one of my biggest conversion headaches. If I can narrow it down further I'll let you know, but at this point it's unlikely to be worth the effort.
Started Thursday at 01:08 PM
Started Tuesday at 02:33 AM
Started January 14