Hi,
Sorry for reviving a very old topic but I just encountered this problem.
If I'm going to do ThorstenE's suggestion, where should I put it?
Thanks.
Hi all,
I need help. I'm getting this error:
Converting posts (this may take some time)...Wrong value type sent to the database. Integer expected. (modified_time)
In the .sql file, where you see:
---* {$to_prefix}members
---{
if (empty($INFO['admin_group']))
$INFO['admin_group'] = 1;
Add after it like this:
---* {$to_prefix}members
---{
if (empty($INFO['admin_group']))
$INFO['admin_group'] = 1;
/* fix invalid birthdates */
if(!preg_match('/\d{4}-\d{2}-\d{2}/', $row['birthdate']))
$row['birthdate'] = '0001-01-01';
Thanks, Emanuele.
Now I hope you can help me out with another problem:
http://www.simplemachines.org/community/index.php?topic=238557.msg3597033#msg3597033
I thought I posted here before, but apparently I just wrote the message and forgot it somewhere in some tab on some computer...
As a suggestion: next time if you have problems with conversion, open a new topic and put all of them together in one place, it's easier to track.
If you don't mind, later I'll split all your posts and put them together into one.
Back to your problem, try replacing:
p.edit_time AS modified_time
with:
IFNULL(p.edit_time, 0) AS modified_time
Quote from: emanuele on August 22, 2013, 11:05:19 AM
As a suggestion: next time if you have problems with conversion, open a new topic and put all of them together in one place, it's easier to track.
Sorry about that. I was just so used to people saying "That has already been asked and answered," etc... Not here, though.
Quote from: emanuele on August 22, 2013, 11:05:19 AM
If you don't mind, later I'll split all your posts and put them together into one.
Sure, no problem :)
Quote from: emanuele on August 22, 2013, 11:05:19 AM
Back to your problem, try replacing:
p.edit_time AS modified_time
with:
IFNULL(p.edit_time, 0) AS modified_time
Trying now.
(Emanuele, you can move my posts to this topic, specifically this (http://www.simplemachines.org/community/index.php?topic=474965.msg3596821#msg3596821) and this (http://www.simplemachines.org/community/index.php?topic=238557.msg3597033#msg3597033), and the corresponding replies :) Thanks!)
OK, I encountered a new error. Please help :( :
Converting topics...
Duplicate entry '141824' for key 'PRIMARY'
I think the solution is:
---* {$to_prefix}topics 250
---* {$to_prefix}topics 250
{
$ignore = true;
}
New error from that new snippet of code, I think:
Converting topics... Unsuccessful!
This query:
{
$ignore = true
LIMIT 0, 250;
Caused the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{
$ignore = true
LIMIT 0, 250' at line 1
Oh, and thanks for putting all my posts in one topic, Emanuele.
Oh darn...sorry, it was meant to be:
---* {$to_prefix}topics 250
---{
$ignore = true;
---}
Similar problem encountered:
Converting posts (this may take some time)...
Duplicate entry '321477' for key 'PRIMARY'
Similar solution...
If you search the piece "converting posts" you will find the place the code should be added.
Though it's strange that returns so many duplicate entries... :-\
Quote from: emanuele on August 25, 2013, 09:51:31 AM
Similar solution...
If you search the piece "converting posts" you will find the place the code should be added.
Oh, OK. Trying now.
Last one worked. Thanks! We're progressing.
But there are new errors:
Converting calendar events...Error in convert script - line 568!
Error in convert script - line 569!
Wrong value type sent to the database. Date expected. (start_date)
Quote from: Craw on August 26, 2013, 08:24:57 PM
Last one worked. Thanks! We're progressing.
But there are new errors:
Converting calendar events...Error in convert script - line 568!
Error in convert script - line 569!
Wrong value type sent to the database. Date expected. (start_date)
Still having this problem :(
I'm sorry, I completely lost these in the unread replies... :-[
This is tricky, because the converter should already take care of converting the timestamp to a string, see:
---{
$row['start_date'] = date('Y-m-d', $row['start_date']);
$row['end_date'] = date('Y-m-d', $row['end_date']);
---}
Did you fill in the past any "custom" event or date?
Because the easy option is to just remove that part of the conversion, SMF already has some events in the database (well, in your case "had", but they can be resotred), so if you didn't do changes or if you didn't use it, you can just ignore that part of conversion and remove its code.
Thanks Emanuele. No worries. I'll try to just remove the code as I don't think I have any real important dates in the calendar.
I'll let you know how it goes.
OK, I removed that snippet of code. But then this error appeared:
Converting calendar events...Error in convert script - line 568!
Unsuccessful!
This query:
TRUNCATE `travels4_ivbd2`.smf4x4ph_calendar
SELECT
event_id AS id_event,
event_unixstamp AS start_date, event_unixstamp AS end_date,
'0' AS id_board, '0' AS id_topic, SUBSTRING(event_title, 1, 60) AS title, event_member_id AS id_member
FROM `travels4_ivbd1`.ibf_cal_events
LIMIT 0, 500;
Caused the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT
event_id AS id_event,
event_unixstamp AS start_date, event_unixstamp AS' at line 2
Is this because I need to remove more code aside from what you last posted above?
Yeah, remove things from that kind of files may be tricky.
Try the one attached. ;)