maqetta/maqetta — Issue #1808: CommentsViews exception breaks mobile theme editor
Author: JonFerraiolo
Created: 2012-02-27 04:55:56+00:00
State: open
Labels: Mobile, Priority High, Review and Commenting, Theme Editor

@billreed63 @jhpedemonte

With latest code, I issued a New Theme command and cloned "custom", and I'm getting an exception at CommentView.js:146 because pageState is not defined. I expect it's because the CommentView logic is expecting that on review editors will generate a "/davinci/states/state/changed" event, but with the merging of the review editors into the main application, this event is generated by the visual page editor and the theme editor (which is the problem in this case).

Probably, all of the dojo.subscribe() calls within the review routines need to be examined to see if it is necessary to check the type of the current editor. Perhaps, check Runtime.currentEditor.declaredClass to see if it equals "davinci/review/editor/ReviewEditor"? Note that lots of other classes save the current editor on the "this" object as this._editor whenever receiving a "/davinci/ui/editorSelected" event.