• August 20, 2017, 11:40:42 AM
• Welcome, Guest. Please login or register.
 
News: It's been a while since we started working on eFiction 5, there's been a lot of starting from scratch and half-scratch, but things are moving on.
Now we need you: please visit the eFicition 5 section of the forum and raise your voice, shape the new face of your favourite fanfiction management software.

Author Topic: EF5 Upgrade Issue  (Read 464 times)

erceyazici

  • Newbie
  • *
  • Posts: 9
  • Country: tr
  • Thanked: 1 times
EF5 Upgrade Issue
« on: March 04, 2017, 02:42:41 AM »
Hi there,

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

Internal Server Error

Quote
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

Quote
PDOStatement: UNIQUE constraint failed: chapters.chapid

[v5_installer-master/lib/base.php:2152] Base->error()
[v5_installer-master/lib/db/sql/mapper.php:422] DB\SQL->exec()
[v5_installer-master/lib/db/cursor.php:242] DB\SQL\Mapper->insert()
[v5_installer-master/inc/sql/upgrade_3_5_x/job_chapters.php:108] DB\Cursor->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!
« Last Edit: March 04, 2017, 12:41:10 PM by erceyazici »

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 274
  • Country: de
  • Thanked: 48 times
Re: EF5 Upgrade Issue
« Reply #1 on: March 04, 2017, 02:04:24 PM »
Hi there!

Well it seems Error #1 originates in your version.php file. (From eFiction 3)
By default, it reads:
Code: [Select]
<?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?
I speak the worlds most widely used language: bad english
The following users thanked this post: erceyazici

erceyazici

  • Newbie
  • *
  • Posts: 9
  • Country: tr
  • Thanked: 1 times
Re: EF5 Upgrade Issue
« Reply #2 on: March 04, 2017, 03:03:47 PM »
Hi there!

Well it seems Error #1 originates in your version.php file. (From eFiction 3)
By default, it reads:
Code: [Select]
<?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] DB\SQL->exec()
[v5_installer-master/lib/db/cursor.php:242] DB\SQL\Mapper->insert()
[v5_installer-master/inc/sql/upgrade_3_5_x/job_descriptors.php:41] DB\Cursor->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()
« Last Edit: March 04, 2017, 03:51:44 PM by erceyazici »

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 274
  • Country: de
  • Thanked: 48 times
Re: EF5 Upgrade Issue
« Reply #3 on: March 04, 2017, 03:53:53 PM »
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?
I speak the worlds most widely used language: bad english

erceyazici

  • Newbie
  • *
  • Posts: 9
  • Country: tr
  • Thanked: 1 times
Re: EF5 Upgrade Issue
« Reply #4 on: March 04, 2017, 04:00:22 PM »
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...
« Last Edit: March 04, 2017, 04:08:49 PM by erceyazici »

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 274
  • Country: de
  • Thanked: 48 times
Re: EF5 Upgrade Issue
« Reply #5 on: March 04, 2017, 04:15:34 PM »
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  :cursing:
In theory it should even work with klingon, but in theory I finished this whole thing a year ago, so that's that.
I speak the worlds most widely used language: bad english

erceyazici

  • Newbie
  • *
  • Posts: 9
  • Country: tr
  • Thanked: 1 times
Re: EF5 Upgrade Issue
« Reply #6 on: March 04, 2017, 04:34:42 PM »
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 :)
The following users thanked this post: Sheepcontrol

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 274
  • Country: de
  • Thanked: 48 times
Re: EF5 Upgrade Issue
« Reply #7 on: March 04, 2017, 04:50:59 PM »
*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
Code: [Select]
PRIMARY KEY (`charid`), KEY `charname` (`charname`(64)) now.

Guess I'll have to adress the character issue another way then.
I speak the worlds most widely used language: bad english
The following users thanked this post: erceyazici

erceyazici

  • Newbie
  • *
  • Posts: 9
  • Country: tr
  • Thanked: 1 times
Re: EF5 Upgrade Issue
« Reply #8 on: March 04, 2017, 05:20:07 PM »
okay, so I made this change, and now here we go with this...


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

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 274
  • Country: de
  • Thanked: 48 times
Re: EF5 Upgrade Issue
« Reply #9 on: March 04, 2017, 07:18:35 PM »
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.
I speak the worlds most widely used language: bad english
The following users thanked this post: erceyazici

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 274
  • Country: de
  • Thanked: 48 times
Re: EF5 Upgrade Issue
« Reply #10 on: March 05, 2017, 12:52:19 AM »
*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
Code: [Select]
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.
I speak the worlds most widely used language: bad english

erceyazici

  • Newbie
  • *
  • Posts: 9
  • Country: tr
  • Thanked: 1 times
Re: EF5 Upgrade Issue
« Reply #11 on: March 05, 2017, 11:12:59 AM »
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.
« Last Edit: March 05, 2017, 12:33:50 PM by erceyazici »

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 274
  • Country: de
  • Thanked: 48 times
Re: EF5 Upgrade Issue
« Reply #12 on: April 09, 2017, 03:12:54 PM »
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  :sad1:

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.
« Last Edit: April 09, 2017, 08:11:13 PM by Sheepcontrol »
I speak the worlds most widely used language: bad english

 

anything
anything