Advertisement:

Author Topic: Re: Converting members...Wrong value type sent to the database. Date expected  (Read 15700 times)

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
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.
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Re: [SMF Converter] IPB 2.3.x
« Reply #1 on: August 21, 2013, 02:21:26 PM »
Hi all,

I need help. I'm getting this error:

Code: [Select]
Converting posts (this may take some time)...Wrong value type sent to the database. Integer expected. (modified_time)
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
In the .sql file, where you see:
Code: [Select]
---* {$to_prefix}members
---{
if (empty($INFO['admin_group']))
$INFO['admin_group'] = 1;

Add after it like this:
Code: [Select]
---* {$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';


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Thanks, Emanuele.

Now I hope you can help me out with another problem:
http://www.simplemachines.org/community/index.php?topic=238557.msg3597033#msg3597033
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Re: [SMF Converter] IPB 2.3.x
« Reply #4 on: August 22, 2013, 11:05:19 AM »
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:
Code: [Select]
p.edit_time AS modified_timewith:
Code: [Select]
IFNULL(p.edit_time, 0) AS modified_time


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Re: Re: [SMF Converter] IPB 2.3.x
« Reply #5 on: August 22, 2013, 11:58:48 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.

If you don't mind, later I'll split all your posts and put them together into one.

Sure, no problem :)

Back to your problem, try replacing:
Code: [Select]
p.edit_time AS modified_timewith:
Code: [Select]
IFNULL(p.edit_time, 0) AS modified_time

Trying now.
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
ERRORS, need help: Converting IPB 2.3.x to SMF 2.0.2
« Reply #6 on: August 22, 2013, 07:15:48 PM »
(Emanuele, you can move my posts to this topic, specifically this and this, and the corresponding replies :) Thanks!)

OK, I encountered a new error. Please help :( :

Code: [Select]
Converting topics...
Duplicate entry '141824' for key 'PRIMARY'
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
I think the solution is:
Code: (find) [Select]
---* {$to_prefix}topics 250
Code: (replace with) [Select]
---* {$to_prefix}topics 250
{
$ignore = true;
}


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
New error from that new snippet of code, I think:

Code: [Select]
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
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Oh, and thanks for putting all my posts in one topic, Emanuele.
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Oh darn...sorry, it was meant to be:
Code: [Select]
---* {$to_prefix}topics 250
---{
$ignore = true;
---}


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Similar problem encountered:
Code: [Select]
Converting posts (this may take some time)...
Duplicate entry '321477' for key 'PRIMARY'
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
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... :-\


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Similar solution...
If you search the piece "converting posts" you will find the place the code should be added.
Oh, OK. Trying now.
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Last one worked. Thanks! We're progressing.

But there are new errors:

Code: [Select]
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)
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Re: Re: Converting members...Wrong value type sent to the database. Date expected
« Reply #15 on: September 01, 2013, 11:59:43 PM »
Last one worked. Thanks! We're progressing.

But there are new errors:

Code: [Select]
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 :(
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Re: Converting members...Wrong value type sent to the database. Date expected
« Reply #16 on: September 02, 2013, 04:26:27 AM »
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:
Code: [Select]
---{
$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.


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Re: Re: Converting members...Wrong value type sent to the database. Date expected
« Reply #17 on: September 06, 2013, 02:59:43 AM »
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.
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline Craw

  • Semi-Newbie
  • *
  • Posts: 62
  • 4x4ph.com
Re: Re: Converting members...Wrong value type sent to the database. Date expected
« Reply #18 on: September 06, 2013, 05:41:43 AM »
OK, I removed that snippet of code. But then this error appeared:

Code: [Select]
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?
4x4 Philippines | www.4xph.com

But He (Jesus Christ) said to me, "My grace is sufficient for you,
for my power is made perfect in weakness."
Therefore
I will boast all the more gladly about my weaknesses,
so that Christ's power may rest on me. -- 2 Corinthians 12:9

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Converting members...Wrong value type sent to the database. Date expected
« Reply #19 on: September 06, 2013, 07:06:47 AM »
Yeah, remove things from that kind of files may be tricky.

Try the one attached. ;)


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.