Forum

Notifications
Clear all

EF5 Upgrade Issue

erceyazici
(@erceyazici)
Active Member

Hi there,

I was trying to upgrade my website to Efiction 5, But I am stuck. My error is

Internal Server Error

Constant _CHARSET already defined

[v5_installer-master/lib/base.php:2152] Base->error()
[version.php:2] define()
[v5_installer-master/inc/upgradetools.php:43] include()
[v5_installer-master/inc/upgrade.php:115] upgradetools::sitedata()
[v5_installer-master/lib/base.php:1599] Base->call()
[v5_installer-master/index.php:43] Base->run()

Okay, I skipped Step 0, and everythings going well until Step 3:

Internal Server Error

PDOStatement: UNIQUE constraint failed: chapters.chapid

[v5_installer-master/lib/base.php:2152] Base->error()
[v5_installer-master/lib/db/sql/mapper.php:422] DBSQL->exec()
[v5_installer-master/lib/db/cursor.php:242] DBSQLMapper->insert()
[v5_installer-master/inc/sql/upgrade_3_5_x/job_chapters.php:108] DBCursor->save()
[v5_installer-master/inc/upgradetools.php:546] chapters_copy()
[v5_installer-master/inc/upgradetools.php:283] jobStart()
[v5_installer-master/inc/upgrade.php:124] upgradetools::processJobs()
[v5_installer-master/lib/base.php:1599] Base->call()
[v5_installer-master/index.php:43] Base->run()

I get this error.

I skipped this error too, and in Step 4, im clicking the link for continue the upgrade and its sending me to the very beginning of the installer tool.

And I really dont get it all. Can somebody help me? Thanks!

Quote
Topic starter Posted : 03/03/2017 9:42 pm
Sheepcontrol
(@sheepcontrol)
Reputable Member

Hi there!

Well it seems Error #1 originates in your version.php file. (From eFiction 3)
By default, it reads:

<?php
if(!defined("_CHARSET")) exit( );
$version = "3.5.5";
?>

Can you post yours?

Error #2 hints towards a duplicate chapter ID, but chapter ID being unique in eFiction 3 already, this should not be possible. Can you check if yout eFiction 3 chapter table has a PRIMARY index in chapid?

ReplyQuote
Posted : 04/03/2017 9:04 am
erceyazici
(@erceyazici)
Active Member

Hi there!

Well it seems Error #1 originates in your version.php file. (From eFiction 3)
By default, it reads:

<?php
if(!defined("_CHARSET")) exit( );
$version = "3.5.5";
?>

Can you post yours?

Error #2 hints towards a duplicate chapter ID, but chapter ID being unique in eFiction 3 already, this should not be possible. Can you check if yout eFiction 3 chapter table has a PRIMARY index in chapid?

Thank you Sheepcontrol,

I have checked my chapid and it has Primary index.

So Ive managed somehow this (made chapid index)... but now its giving me this error:

Internal Server Error

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY' [/home/hikayeevi_salon/beta.hikayeevi.com/v5_installer-master/lib/db/sql.php:227]

[v5_installer-master/lib/db/sql.php:227] PDOStatement->execute()
[v5_installer-master/lib/db/sql/mapper.php:422] DBSQL->exec()
[v5_installer-master/lib/db/cursor.php:242] DBSQLMapper->insert()
[v5_installer-master/inc/sql/upgrade_3_5_x/job_descriptors.php:41] DBCursor->save()
[v5_installer-master/inc/upgradetools.php:546] descriptors_characters()
[v5_installer-master/inc/upgradetools.php:283] jobStart()
[v5_installer-master/inc/upgrade.php:124] upgradetools::processJobs()
[v5_installer-master/lib/base.php:1599] Base->call()
[v5_installer-master/index.php:43] Base->run()

ReplyQuote
Topic starter Posted : 04/03/2017 10:03 am
Sheepcontrol
(@sheepcontrol)
Reputable Member

Try running the process from start, chances are it did repeat one step try to add data twice.

How is your version.php looking, regarding the first error?

ReplyQuote
Posted : 04/03/2017 10:53 am
erceyazici
(@erceyazici)
Active Member

I made changes in my version.php and its perfect now, thanks to you.

So now trying to upgrade from the beginning. Im gonna let you know

Thanks again

Okay... I think there is a problem with my Character list. Cuz its stuck exact same point...

ReplyQuote
Topic starter Posted : 04/03/2017 11:00 am
Sheepcontrol
(@sheepcontrol)
Reputable Member

That's bad 🙁

Are you using phpMyAdmin or something alike?
Maybe export the chapter table and post it/send it to me by mail?
Chances are the installer is a bloody racist and doesn't like turkish characters, in which case I'll apply proper beating 
In theory it should even work with klingon, but in theory I finished this whole thing a year ago, so that's that.

ReplyQuote
Posted : 04/03/2017 11:15 am
erceyazici
(@erceyazici)
Active Member

I think its about duplicate names. I have 24 character with exact same name from different fandoms. So, I deleted those names and now Im trying to restart upgrade. I will let you know again 🙂

ReplyQuote
Topic starter Posted : 04/03/2017 11:34 am
Sheepcontrol
(@sheepcontrol)
Reputable Member

*doh* stupid me, I actually set character to unique, which might be a bad thing after all.
Well the thought was, since characters are being selected in a different way now, to make sure they are unique to not cause confusion.
Seems that's not such a good thing after all.

In the installer, look for the file /inc/sql/install/tables_core.php, go to line 156 and remove the word UNIQUE from the index row.
It should read

PRIMARY KEY (`charid`), KEY `charname` (`charname`(64))

now.

Guess I'll have to adress the character issue another way then.

ReplyQuote
Posted : 04/03/2017 11:50 am
erceyazici
(@erceyazici)
Active Member

okay, so I made this change, and now here we go with this...

Trying to get property of non-object

[v5_installer-master/lib/base.php:2152] Base->error()
[v5_installer-master/inc/sql/upgrade_3_5_x/job_stories.php:326] Base->{closure}()
[v5_installer-master/inc/upgradetools.php:546] stories_recount_categories()
[v5_installer-master/inc/upgradetools.php:283] jobStart()
[v5_installer-master/inc/upgrade.php:124] upgradetools::processJobs()
[v5_installer-master/lib/base.php:1599] Base->call()
[v5_installer-master/index.php:43] Base->run()

ReplyQuote
Topic starter Posted : 04/03/2017 12:20 pm
Sheepcontrol
(@sheepcontrol)
Reputable Member

This one has me puzzled, since it's past the copying part, here the installer is building stats of the categories.

It's an iterated process and a bit tricky to recreate without the data. I'll run the script on my data again to see if I can create this error.

ReplyQuote
Posted : 04/03/2017 2:18 pm
Sheepcontrol
(@sheepcontrol)
Reputable Member

*doh* stupid me, I actually set character to unique, which might be a bad thing after all.
Well the thought was, since characters are being selected in a different way now, to make sure they are unique to not cause confusion.
Seems that's not such a good thing after all.

In the installer, look for the file /inc/sql/install/tables_core.php, go to line 156 and remove the word UNIQUE from the index row.
It should read

PRIMARY KEY (`charid`), KEY `charname` (`charname`(64))

now.

Guess I'll have to adress the character issue another way then.

Okay, after all it wasn't that hard to replicate the old eFiction 3 behaviour of limiting characters to selected categories. It's in the latest commit on git.

ReplyQuote
Posted : 04/03/2017 7:52 pm
erceyazici
(@erceyazici)
Active Member

This one has me puzzled, since it's past the copying part, here the installer is building stats of the categories.

It's an iterated process and a bit tricky to recreate without the data. I'll run the script on my data again to see if I can create this error.

hey Sheepcontrol, is there a way for me to try this step with sql first?

and there are stories with multi categories... Maybe thats the reason why I getting error? EDIT: No its not. I am changing Turkish characters... and No again.

ReplyQuote
Topic starter Posted : 05/03/2017 6:12 am
Sheepcontrol
(@sheepcontrol)
Reputable Member

Okay, seems eFiction 3 kind of messed up the `leveldown`field, there is a category in level 1 with a sub in level 3.
Now when building stats for level 1, level 2 elements are loaded to provide sub stats - but the stats are bound to a level 3 element, therefore the index is empty -> error.

Assuming this is not the only site with this kind of error, I'll have to find a more stable way of doing this part, some kind of tree or thing like that.

All wrong 

The query used to count categories is using GROUP_CONCAT, which has a built in limit of 1024 characters.
I am testing with a small-ish archive, so the error never occured there.

Anyway, the culprit has been pointed out and shall be - well - something.
I have a quick fix in place which temporarily raises this limit sky high, this should be accepted by all MySQL servers and is only valid for this session (maximum during installation), so can't do anything bad.

Testing is required, however.

Still, rebuilding the leveldown (depth) is already in place and not doint any harm, so it will remain, maybe it will catch other errors in the future.

ReplyQuote
Posted : 09/04/2017 11:12 am
Share: