I upgraded from d5 to d6 and unfortunately I have many problems.
I'm going to explain that:
1. Issues doesn't work.
I created issue 20 and it seems ok, but when I insert a new article and select issue 20, I receive an error message saying that none issue has been selected.
If I try to create issue 21, I received the following error message:
user warning: Duplicate entry '0' for key 1 query: INSERT INTO ejournal_issues (jid, year, volume, number, custom_identification, cover_page_nid, date_published, status, issue_order, description) VALUES ('2', '2009', '9', '21', '', '0', '1259658000', '1', '0', 'numero 21') in /var/www/vhosts/spazioausili.net/httpdocs/modules/ejournal/ejournal.module on line 2205.

The other thing is that I have ejournal duplicated in the permissions configuration.
I have the following voices for permissions, is it right?
ejournal administrator
ejournal chief editor
ejournal editor
ejournal others
ejournal proofreader
ejournal reviewer
ejournal staff
ejournal-2 author
ejournal-2 chief editor
ejournal-2 editor
ejournal-2 others
ejournal-2 proofreader
ejournal-2 reviewer

CommentFileSizeAuthor
#10 ejournal_sql_table_local_site.zip7.12 KBdrein
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drein’s picture

Sorry for the duplicated issue, but drupal.org site gaves me a 503 errors, service unavailable and something about the cache.
Still apologize for this.

romca’s picture

Hi,
seeing multiple permissions is correct - one is general (for the whole site), one is only publication-specific

I will have a look at the "issue" with issues later, but it will be probably something simple - like not reading values from the correct field. will let you know

roman

drein’s picture

Ok let me know when you have time, I hope it should quite simple!

romca’s picture

Hi,
I looked around, scratched my head, found nothing :-) Are you sure you are really using version rc3? It is working, as far as I can tell.

For the updates, it is important that you run update.php - have you done that?

roman

ps: sorry for the delay, days are short

drein’s picture

Hi Roman,
Tomorrow I will make another check, deleting rc3 and re-uploading to the server and make update.php another time.
Also because this is in my production site and I have the newspaper stopped...
this is not very good as you can understand.
anyway, I'll let you know tomorrow and then we'll see what to do.
thanks in advance.

drein’s picture

other info.

I created a new journal, the creation doesn't give any error, but in the ejournal settings I don't see the new journal.
If I make update.php I don't have any error, but, if for example I select to make update 1 for ejournal, there is something strange.
Some following errors are normal because I already updated from d5 to d6, anyway:

user warning: Can't DROP 'citation_template'; check that column/key exists query: ALTER TABLE ejournal_journals DROP citation_template in /var/www/vhosts/spazioausili.net/httpdocs/includes/database.mysql-common.inc on line 322.
user warning: Table 'spazio_ausili.ejournal_articles_log' doesn't exist query: alter table ejournal_articles_log change `id` `lid` int (9) NOT NULL AUTO_INCREMENT in /var/www/vhosts/spazioausili.net/httpdocs/modules/ejournal/ejournal.install on line 145.
user warning: Table 'spazio_ausili.ejournal_articles_log' doesn't exist query: alter table ejournal_articles_log change `nid` `id` int (9) NOT NULL in /var/www/vhosts/spazioausili.net/httpdocs/modules/ejournal/ejournal.install on line 146.
user warning: Table 'spazio_ausili.ejournal_articles_log' doesn't exist query: alter table ejournal_articles_log change `iid` `entity` varchar (16) NOT NULL in /var/www/vhosts/spazioausili.net/httpdocs/modules/ejournal/ejournal.install on line 147.
user warning: Table 'spazio_ausili.ejournal_articles_log' doesn't exist query: ALTER TABLE ejournal_articles_log RENAME TO ejournal_log in /var/www/vhosts/spazioausili.net/httpdocs/includes/database.mysql-common.inc on line 249.
user warning: Duplicate key name 'id' query: ALTER TABLE ejournal_log ADD INDEX id (id) in /var/www/vhosts/spazioausili.net/httpdocs/includes/database.mysql-common.inc on line 434.
Ad module file-cached data has been flushed to the database.
Updates were attempted. If you see no failures below, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually. All errors have been logged.

Main page
Administration pages
The following queries were executed
ejournal module
Update #1
Failed: ALTER TABLE {ejournal_journals} DROP citation_template
Update #2
Failed: alter table {ejournal_articles_log} change `id` `lid` int (9) NOT NULL AUTO_INCREMENT
Failed: alter table {ejournal_articles_log} change `nid` `id` int (9) NOT NULL
Failed: alter table {ejournal_articles_log} change `iid` `entity` varchar (16) NOT NULL
Failed: ALTER TABLE {ejournal_articles_log} RENAME TO {ejournal_log}
update {ejournal_log} set message=concat(message, ' (iid: ', `entity`, ')')
update {ejournal_log} set type='notice' where type='message'
Failed: ALTER TABLE {ejournal_log} ADD INDEX id (id)
update ejournal_log set entity='node', type='insert' where message like '%insert%'
update ejournal_log set entity='node', type='update' where message like '%proofreader%'
update ejournal_log set entity='node', type='update' where message like '%section%'
update ejournal_log set entity='node', type='update' where message like '%is unpublished%'
update ejournal_log set entity='node', type='update' where message like '%issue changed%'
update ejournal_log set entity='node', type='message' where entity not in ('node')
Update #6001
ALTER TABLE {ejournal_issues} CHANGE `status` `status` INT NOT NULL DEFAULT 0

romca’s picture

Hi drein,

It is not a good idea to run something directly on a production site - did you backup your database? Please do it immediately, if you didn't.

The errors you see, are because you try to run updates on already converted tables (running old updates is a bad idea as well - normally, drupal will select the first update automatically, depends on the version of the previous module, that you ran)

And now to the possible cases:

- please update your menu (visit the menu configuration)
- then try going to admin/settings/ejournal
- also admin/ejournal

Now questions:
- do you see your old journal?
- can you edit/update it? (admin/settings/ejournal/edit/1...)

The updates you run, should not be dangerous to your data - but it is very strange you are getting those errors.

Is the downloaded archive OK? I recommend going with this release: http://ftp.drupal.org/files/projects/ejournal-6.x-1.x-dev.tar.gz

if you have a sqladmin, or any way to peek, into your database, then please do so and look at tables:
ejournal_journals (if there is a record for the journal)
ejournal_articles (there must be many rows if you had a running journal)

I hope you haven't run "uninstall" on your production site

roman

drein’s picture

Hi,
I spent all day making tests.
First of all, don't worry about my database, I make a backup everyday, so if something goes wrong, I restored the previous situation.
On my production site I restored the situation in which I have all my journal issues published, so people can read all articles.
New issues are stopped since we don't find a solution.

Now, I installed drupal5 in a local environment.
I used ejournal 5.x-1-x-dev, so first I upgraded to ejournal 5.x-2.x-dev.
I tried to create 2 issues and all goes ok.
So I upgraded to drupal6.
I installed ejournal 6.x-1.x-dev, of 7 dicember 2009.
Run update.php with no error.

but, I have the same situation. I create an issue, it apparently seems ok, but if I created another issue, I receive a duplicate query error.

So, I opened phpmyadmin, and look for the ejournal_issues table.
As you know, there are 11 fields, the first is IID, second is GID, etc.

Gid is a number that increments each time I create an issue, and here is the error.
When I try to create an issue, GID value is 0.
So, the first issue is created because no issues have Gid value of 0, but when I create another issue, I receive a duplicate error because ejournal want to assign another time 0 to Gid.

Instead of 0, it should be 43.

This problem doesn't exist with a fresh installation of ejournal, or if I uninstall ejournal and re-install it.

So, in your opinion, what is the roadmap?
1. I uninstall ejournal, re-install it, create a new journal and we find a method to import all 2000 articles.
2. We try to fix this problem with existing data.

If can help, I can attach some sql tables.

I didn't make any test with creation of other journals, so I can't give response to all your question.
I'm very sorry for all this, but things seems quite complicated.

romca’s picture

Hi drein,

many thanks for the info, it would help us a lot if you could send the current definition of the offending sql table - to see its structure (but please note, it must be the table when it gives the errors). I am wondering if I forgot to prepare some update of the table structure

it will be simple to fix it, you will not need to copy any data - but first we will have to find the problem, it looks like it is somewhere in the database definition after the upgrade, but i would like to be sure

thanks,

roman

drein’s picture

theses are the sql tables of my local site, where it is impossible to create a new issue.
Good luck!!!!!!!

romca’s picture

Hi Drein,

the problem turned out to be with the old table scheme - as you already said. I have committed an update, under number 6002 which will fix the problems (both with issue creation, as well as with issue assignment for existing issues) -- it will update your ejournal_issues and replace iid=0 with new iid

So, for you it should be as simple as running the new update 6002

Please use the dev release, I didn't commit the new tag yet. Thanks

roman

drein’s picture

Status: Active » Fixed

great patch!
Thank you, all problem are solved downloading the latest dev.
updated are ok and all issues are created automatically.
Great work!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.