Problems with project copying, creating template, or project from template
Symptoms
Errors like "Project id= with parent_id=0: parent missing or without 'lft' value" during project copying, creating template or creating project from template.
Project tree is broken. A project appears to be under a different parent project in project list and in detail view of the project.
Solution
- Go to server where the problem is seen. Switch to user from whom redmine is running.
- Go to your current redmine folder (default: /home/easy/current)
- Run rails console
bundle exec rails c RAILS_ENV=production - Run project_tree and issues_tree rebuild
Issue_tree.rebuild!
Project_tree.rebuild! - Check if the problem still exists! If yes, continue.
- With sudo open file /etc/mysql/my.cnf
sudo vim /etc/mysql/my.cnf
and add the next line somewhere in [mysqld] area
transaction_isolation = SERIALIZABLE
save the changes and restart mysql service. - Check. Everything should work properly now.