Summary: | Babel server blank plugin_id for deleted properties file | ||||||
---|---|---|---|---|---|---|---|
Product: | [Technology] Babel | Reporter: | Antoine Toulmé <antoine> | ||||
Component: | Server | Assignee: | Babel server inbox <babel.server-inbox> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P1 | CC: | kitlo, ywong | ||||
Version: | unspecified | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Mac OS X - Carbon (unsup.) | ||||||
Whiteboard: | |||||||
Bug Depends on: | |||||||
Bug Blocks: | 252625, 258002 | ||||||
Attachments: |
|
Description
Antoine Toulmé
2008-11-06 06:52:45 EST
Workaround for now: for those files we rely on the old way of finding the plugin id. I will bring the discussion to the babel-dev mailing list. I vote 3. I'm raising priority here, because our database is full of 'deleted' files, and this could cause our translators to work for nothing. Created attachment 118201 [details]
Patch that fixes #3
Denis or Kit, please take a look at the attached patch.
Changing state to assigned. cc'ing Margaret The patch looks good, but I haven't tested it on my dev box. I believe we have an event log PHP class that could probably be used to log file additions and deletions, so we can track when these occurred. What do you think? I don't have any strong opinions about it. Otherwise, +1 +1 callback/getFilesForProject.php was also missing: AND f.is_active = 1 So all files, even inactive ones, currently show up in the UI for translation. I've fixed this on staging. The maps processor seems to be removing dead files (as of the revision in the repo) properly. I just need to make sure the files are not available for translation in the UI. I think we're done here. I marked a bunch of files as is_active = 0 and they don't show up in the UI, and Antoine has changed the maps processor to mark dead files as inactive. +1 for closing this FIXED. I'll also add this trigger, to automatically update the is_active status of strings when we update the is_active status of a file: SET @OLD_SQL_MODE=@@SQL_MODE; DELIMITER ;; /*!50003 SET SESSION SQL_MODE="" */;; DROP TRIGGER IF EXISTS `upd_is_active`;; /* This trigger will recursively update the is_active status of the strings of a file */ CREATE TRIGGER `upd_is_active` AFTER UPDATE ON `files` FOR EACH ROW BEGIN UPDATE strings set is_active = NEW.is_active WHERE strings.file_id = NEW.file_id; END; ;; DELIMITER ; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */; Closing as FIXED, and the trigger is running on both the live and staging DB. |