Defect #4743
closedMigrate from trac - not displayed Wikis
0%
Description
We have installed Redmine on a server Debian Lenny with fresh database and default data loaded. All has earned well.
Have then started a script of converting of base from Trac as it is specified in the documentation: http://www.redmine.org/wiki/redmine/RedmineMigrate
rake redmine:migrate_from_trac RAILS_ENV="production" (in /home/redmine) WARNING: a new project will be added to Redmine during this process. Are you sure you want to continue ? [y/N] y Trac directory []: /home/mike/hosting Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: sqlite3 Trac database encoding [UTF-8]: Target project identifier []: hosting Migrating components............... Migrating milestones............................................................ Migrating custom fields........ Migrating tickets........................................................ Migrating wiki.............................................................. Components: 13/15 Milestones: 60/60 Tickets: 3740/3740 Ticket files: 19/41 Custom values: 19174/19174 Wiki edits: 6440/6440 Wiki files: 57/73
There after appeared Redmine users, tickets, fields and everything else except the wiki pages.
And pages are visible in results of search, but transition under links conducts on an error 404.
Also they are present at a database, in tables wiki_contents and wiki_pages, but table wikis remained empty.
ruby script/about
About your application's environment Ruby version 1.8.7 (x86_64-linux) RubyGems version 1.3.4 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version 2.3.5 Application root /home/redmine Environment development Database adapter mysql Database schema version 20091227112908
Trac:
trac version - 0.11.5 sqlite version - 3.6.21
Updated by Mike Stupalov almost 15 years ago
- Assignee set to Jean-Philippe Lang
Please help to migrate.
Our company wants to migrate to your wonderful product, but the problem with the conversion of the wiki pages stop transition.
Updated by Kamil . almost 15 years ago
You have to set up your wiki start page in the settings of your project.
This should help, but unfortunately #3910 issue is still not resolved and cause a lot of work :/
Updated by Mike Stupalov almost 15 years ago
You have to set up your wiki start page in the settings of your project.
Setup wiki start page in the settings not help. Pages are not accessible even on direct transition.
This should help, but unfortunately #3910 issue is still not resolved and cause a lot of work :/
No, it's other problem, for us not critical.
Updated by Jani Partanen almost 15 years ago
I have this same problem with v0.9.2
All seems to go smooth and no errors, but wiki ain't working.
Updated by Jani Partanen almost 15 years ago
Okey, I find out problem.
For some reason when you migrate trac, when import process create new project, it also seems to create new default wiki. Then wiki with that project id already exists, so import will create new wiki, with new project id number.
So I got my wiki working just by editing database by hand
UPDATE `redmine`.`wiki_pages` SET `wiki_id` = '2' WHERE `wiki_id` = 3;
Hope this will helps to nail issue.
Updated by Alexander Stehlik almost 15 years ago
I had the same issue and I also realized that there are two wikis for the new project in the database:
mysql> select * from wikis where project_id=15; +----+------------+------------+--------+ | id | project_id | start_page | status | +----+------------+------------+--------+ | 11 | 15 | Wiki | 1 | | 12 | 15 | WikiStart | 1 | +----+------------+------------+--------+
I solved this problem in a different way. I simply deleted the first wiki of the new project in the "wikis" table. Since there are no pages in that wiki that's all you need to do.
delete from wikis where id=11;
After I dropped the wiki, the pages migrated from trac can be accessed without problems.
Updated by Jean-Philippe Lang over 14 years ago
- Status changed from New to Resolved
- Target version set to 0.9.4
- Resolution set to Fixed
Fixed in r3517. Thanks for pointing it out.
Updated by Jean-Philippe Lang over 14 years ago
- Status changed from Resolved to Closed
Updated by Claudio Bley over 11 years ago
My Ruby is a bit rudimentary. But I wonder how r3517's patch fixes things...
@target_project = project.new_record? ? nil : project @target_project.reload
AFAICS, @target_project will be set to nil if new_record? yields true. Then, you're trying to call the reload method on a nil object...
You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.reload /usr/share/redmine/lib/tasks/migrate_from_trac.rake:685:in `target_project_identifier' /usr/share/redmine/lib/tasks/migrate_from_trac.rake:759
Is it possible, that it's only supposed to work if the name of the trac project matches the name of the redmine project? I mean, it works this way currently. Actually, it only works if one uses all lower case letters for Target project identifier. Otherwise, it's "Unable to create a project with identifier 'XXX'!
"