Re: Converting members...Wrong value type sent to the database. Date expected

Started by Craw, August 21, 2013, 06:30:09 AM

Previous topic - Next topic

Craw

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

Craw

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)
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

emanuele

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';


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.

Craw

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

emanuele

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


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.

Craw

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.
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

Craw

(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 :( :

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

emanuele

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.

Craw

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
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

Craw

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

emanuele

Oh darn...sorry, it was meant to be:
---* {$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.

Craw

Similar problem encountered:
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

emanuele

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.

Craw

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.
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

Craw

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)
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

Craw

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 :(
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

emanuele

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.


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.

Craw

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

Craw

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?
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

emanuele

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.

Advertisement: