ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Error converting authorless wiki content versions to journals (Bug #426)


Added by Adam Soltys at 2011-05-25 09:01 am. Updated at 2011-05-30 08:06 am.


Status:Closed Start date:
Priority:Normal Due date:
Assignee:Adam Soltys % Done:

0%

Category:Journals / History
Target version:-
Remote issue URL: Affected version:unstable

Description

I hit an error in 20100804112053_merge_wiki_versions_with_journals.rb while migrating on the unstable branch. Some of the records in my wiki_content_versions table had a NULL author_id, which is used to populate the user_id column in the journals table, which cannot be NULL. Presumably these were wiki edits made by a user that was subsequently deleted.

I added a "next unless wv.author_id" line at the top of the loop to skip over authorless wiki versions, but I'm not sure what the most appropriate way to handle this situation is in general.


History

Updated by Felix Schäfer at 2011-05-25 09:31 am

Adam Soltys wrote:

Presumably these were wiki edits made by a user that was subsequently deleted.

Removed by hand directly in the DB or by the newly introduced user deletion "feature" in Redmine? In the first case I'd say its your fault, and most if not all Redmine and ChiliProject devs have probably told you not to do it ;-) I'll have a look though.

Come to think of it, I'd also wager you couldn't show the history for those wiki pages, at least not the pages where the versions with the deleted users should have appeared.

I added a "next unless wv.author_id" line at the top of the loop to skip over authorless wiki versions, but I'm not sure what the most appropriate way to handle this situation is in general.

Just removing those records is probably not the best idea. I'd say the least would be to assign them to the anonymous user, but that wouldn't be correct either. I'm not sure this is something we should work around as it shouldn't happen in the first place, and every solution that comes to mind for now is not very satisfying…

  • Target version set to 2.0.0
  • Assignee set to Felix Schäfer

Updated by Adam Soltys at 2011-05-25 11:13 am

Ah, I didn't realize Redmine didn't support deleting users until recently. In that case, you may be right, there's a chance that at some point I had gone into the database and manually caused some sort of havoc. I certainly wouldn't put it past me. If that's the case, I'm sorry for raising this issue. I'll try to verify whether this is a legitimate issue tomorrow too unless you beat me to it.

Updated by Felix Schäfer at 2011-05-29 03:33 pm

Have you looked at your installation to see if this was because of manually removed users or because of users removed from the interface in Redmine? I'm more and more inclined to just "ignore" this as "we told you" if it's the former, because I'm not really satisfied with remapping them to Anonymous for example.

  • Assignee changed from Felix Schäfer to Adam Soltys
  • Status changed from Open to Needs more information

Updated by Eric Davis at 2011-05-29 06:22 pm

  • Target version deleted (2.0.0)

Updated by Adam Soltys at 2011-05-30 01:38 am

I wasn't able to delete users through the interface at all, only lock them. So yeah, I'm assuming the NULL author_id's were a result of manual fiddling on my part. Closing this now.

  • Status changed from Needs more information to Closed

Updated by Felix Schäfer at 2011-05-30 08:06 am

Thanks for the feedback.

Also available in: Atom PDF