async_get_widget: Server Error: No module named 'spt' - Printable Version +- TACTIC Open Source (http://forum.southpawtech.com) +-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3) +--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4) +--- Thread: async_get_widget: Server Error: No module named 'spt' (/showthread.php?tid=102) Pages:
1
2
|
async_get_widget: Server Error: No module named 'spt' - listy - 04-26-2020 async_get_widget: Server Error: No module named 'spt' I got this error on TACTIC 4.8 Python 3.7 When i have table with groupping and async loading. RE: async_get_widget: Server Error: No module named 'spt' - remkonoteboom - 04-27-2020 Do you happen to have a server side output and stack trace when running in debug mode? Could you post it? RE: async_get_widget: Server Error: No module named 'spt' - listy - 04-28-2020 Hi! Sorry i was totally wrong not posting it in the first place So here are some js error from console: Uncaught TypeError: $(...).bmdRipples is not a function at run_bvr (eval at spt.behavior.run_cbjs (behavior.js?ver=4.8.0.a01:254), <anonymous>:2:15) at Object.spt.behavior.run_cbjs (behavior.js?ver=4.8.0.a01:259) at Object.spt.behavior.process_load_behaviors (behavior.js?ver=4.8.0.a01:1341) at Object.spt.behavior._construct_behaviors (behavior.js?ver=4.8.0.a01:1279) at Object.spt.behavior.construct_behaviors_on_startup (behavior.js?ver=4.8.0.a01:395) at Object.spt.onload_startup (spt_onload_startup.js?ver=4.8.0.a01:18) at onload ((index):67) And one more: Uncaught TypeError: $(...).bootstrapMaterialDesign is not a function at HTMLDocument.<anonymous> ((index):224) at e (jquery-3.4.1.min.js:2) at t (jquery-3.4.1.min.js:2) Here is error from server-side: ERROR DURING TASK EXECUTION Traceback (most recent call last): File "/home/apache/tactic/src/tactic/command/kronos.py", line 842, in threadedcall self.execute() File "/home/apache/tactic/src/tactic/command/kronos.py", line 490, in execute self.action(*self.args, **self.kw) File "/home/apache/tactic/src/tactic/command/scheduler.py", line 237, in _do_execute Batch(site=self.site, login_code=self.user, project_code=self.project,ticket=self.login_ticket) File "/home/apache/tactic/src/pyasm/security/batch.py", line 60, in __init__ self._do_login() File "/home/apache/tactic/src/pyasm/security/batch.py", line 86, in _do_login security.login_as_batch(self.login_code, ticket=self.ticket) File "/home/apache/tactic/src/pyasm/security/security.py", line 1453, in login_as_batch self._login = Login.get_by_login(login_name, use_upn=True) File "/home/apache/tactic/src/pyasm/security/security.py", line 255, in get_by_login search = Search("sthpw/login") File "/home/apache/tactic/src/pyasm/search/search.py", line 102, in __init__ project = Project.get_by_code(project_code) File "/home/apache/tactic/src/pyasm/biz/project.py", line 223, in get_by_code return super(Project, cls).get_by_code(project_name) File "/home/apache/tactic/src/pyasm/search/search.py", line 5609, in get_by_code search = Search( cls.SEARCH_TYPE ) File "/home/apache/tactic/src/pyasm/search/search.py", line 229, in __init__ raise SearchException('This database [%s] does not exist' %self.database) pyasm.search.search.SearchException: This database [sthpw] does not exist And one more: user: admin simple method: <function ApiXMLRPC.get_widget at 0x7f2d57de9170> ticket: 6ff5033530698d4ad51 ( 'tactic.ui.bootstrap_app.bootstrap_index_wdg.BootstrapSideBarPanelWdg', { 'args': { 'bvr_list': '[{"type": "load", "cbjs_action": ' '"\\nspt.side_bar = {};\\n// Side bar panel ' 'functionality\\n//\\n//\\nspt.side_bar.load_section ' '= function(evt, bvr)\\n{\\nvar dst_el = ' 'bvr.dst_el;\\nvar options = bvr.options;\\n// ' 'get the class name from the destination ' 'element\\nvar top_el = ' 'dst_el.firstChild\\nvar class_name = ' 'top_el.getAttribute(\\"spt_class_name\\")\\nEffects.fade_out(dst_el, ' '150);\\nvar server = ' 'TacticServerStub.get();\\nvar kwargs = ' "{'args': options};\\nvar widget_html = " 'server.get_widget(class_name, ' 'kwargs);\\nspt.behavior.replace_inner_html( ' 'dst_el, widget_html ' ');\\nEffects.fade_in(dst_el, 150);\\n}\\n// ' 'Displays a table to a target id\\n//\\n// ' 'behavior:\\n// target_id: the target id ' 'element that the table will be put in\\n// ' 'search_type: the search_type of the sobjects ' 'in the table\\n// view: the view of the ' 'table\\n//\\nspt.side_bar.display_link_cbk = ' 'function(evt, bvr) {\\nvar target_id = ' 'bvr.target_id;\\nvar title = bvr.title;\\nvar ' 'options = bvr.options;\\nvar values = ' 'bvr.values;\\nvar is_popup = ' 'bvr.is_popup;\\nspt.side_bar._display_link_action( ' 'target_id, title, options, values, is_popup ' ');\\n}\\nspt.side_bar._display_link_action = ' 'function(target_id, title, options, values, ' "is_popup)\\n{\\nvar busy_title = 'Load " "View';\\nvar busy_msg = 'View is now loading " "in a popup window ...';\\nif( ! " 'spt.is_TRUE(is_popup) ) {\\nbusy_msg = ' '\'\\"\' + title + \'\\" view is now loading ' "...';\\n}\\n//show busy " 'message\\n//spt.app_busy.show( busy_title, ' 'busy_msg );\\nsetTimeout( function() ' '{\\nspt.side_bar._load_for_display_link_change(target_id, ' 'title, options, values, is_popup);\\nif( ' 'spt.is_TRUE(is_popup) ' ')\\nspt.app_busy.hide();\\n}, 10 ' ');\\n}\\nspt.side_bar._load_for_display_link_change ' '= function(target_id, title, options, values, ' 'is_popup)\\n{\\n// var link = ' 'spt.side_bar._link_display_info;\\nvar path = ' "options['path'];\\n// display a table\\nvar " "widget_class = options['widget_key'];\\nif " '(widget_class == null) {\\nwidget_class = ' '\\"tactic.ui.panel.ViewPanelWdg\\";\\n}\\noptions[\\"title\\"] ' '= title;\\nif( spt.is_TRUE(is_popup) ) ' "{\\noptions['target_id'] = " 'target_id;\\nspt.panel.load_popup(title, ' 'widget_class, options);\\n}\\nelse {\\nvar ' 'target_element = ' 'document.id(target_id);\\nvar main_body = ' "document.id('main_body');\\nvar tab_top = " 'main_body.getElement(\\".spt_tab_top\\");\\nspt.tab.top ' '= tab_top;\\nvar class_name = ' "options['widget_key'];\\n// Use path instead " 'for the name\\n//var element_name = ' "options['element_name'];\\nvar element_name = " "options['path'];\\nspt.tab.load_selected(element_name, " 'title, class_name, options, values);\\n// Set ' 'the state of the page\\nvar key = ' '\\"top_layout\\";\\nvar panel_id = ' '\\"main_body\\";\\nvar server = ' 'TacticServerStub.get();\\nserver.set_application_state(key, ' 'panel_id, widget_class, options, ' 'values);\\n// set the url hash\\nif ' '(typeof(options.element_name) != ' '\\"undefined\\") {\\nvar hash = ' '\\"/link/\\"+options.element_name;\\nif( ! ' 'spt.browser.is_Firefox() && ! ' 'spt.browser.is_Opera() ) {\\nhash = ' 'encodeURI( hash );\\n}\\nvar state = ' "{\\nmode: 'tab',\\nhash: " 'hash,\\nelement_name: ' 'options.element_name,\\ntitle: ' 'title\\n};\\nvar url = ' '\\"link/\\"+options.element_name;\\nspt.hash.set_hash( ' 'state, title, url );\\n}\\nelse ' '{\\nalert(\\"DEPRECATD: set hash in sidebar ' 'load_display\\");\\nvar kwargs = ' "{'predefined': " 'true};\\nspt.panel.set_hash(panel_id, ' 'widget_class, options, ' 'kwargs)\\n}\\n}\\n}\\n// Command that occurs ' 'when a user clicks on a ' 'link\\n//\\nspt.side_bar.DisplayLinkCmd = ' 'function(target_id, title, options, values, ' 'is_popup) {\\nthis.target_id = ' 'target_id;\\nthis.title = ' 'title;\\nthis.options = ' 'options;\\nthis.values = ' 'values;\\nthis.is_popup = ' 'is_popup;\\nthis.prev_options = ' '{};\\nthis.get_description = function () { ' 'return \\"DisplayLinkCmd\\"};\\nthis.execute ' '= function() { \\n// get the target ' 'element\\nvar target_element = ' 'document.id(this.target_id);\\nthis.redo();\\n}\\nthis.redo ' '= function() {\\n// display a table\\nvar ' 'widget_class = ' "this.options['class_name'];\\nif " '(widget_class == null) {\\nwidget_class = ' '\\"tactic.ui.panel.ViewPanelWdg\\";\\n}\\nvar ' "path = this.options['path'];\\nif " "(this.is_popup == 'true' || this.is_popup == " 'true) {\\n// set a default width of ' "600px\\n//this.options['width'] = " "'600px';\\nthis.options['target_id'] = " 'this.target_id;\\nspt.panel.load_popup(path, ' 'widget_class, this.options);\\n}\\nelse ' '{\\nvar target_element = ' 'document.id(this.target_id);\\n//document.id(\\"breadcrumb\\").innerHTML ' "= '<div><img " 'src=\\"/context/icons/common/indicator_snake.gif\\" ' 'border=\\"0\\"> \' ' "+\\n// 'Loading " '\\"\' + this.title + \'\\" ' "...</div>';\\nspt.panel.load(target_element, " 'widget_class, this.options, this.values)\\n// ' 'Set the state of the page\\nvar key = ' '\\"top_layout\\";\\nvar panel_id = ' '\\"main_body\\";\\nvar server = ' 'TacticServerStub.get();\\n// Make sure to ' 'send back the link title for the saved last ' 'link options\\nthis.options[\\"title\\"] = ' 'this.title\\nserver.set_application_state(key, ' 'panel_id, widget_class, this.options, ' 'this.values);\\n// also set the ' 'breadcrumb\\n//document.id(\\"breadcrumb\\").innerHTML ' '= ' 'path\\n//document.id(\\"breadcrumb\\").innerHTML ' '= this.title\\n// set the url hash\\nif ' '(typeof(this.options.element_name) != ' '\\"undefined\\") {\\nvar hash = ' '\\"link=\\"+this.options.element_name;\\nif( ' '! spt.browser.is_Firefox && ! ' 'spt.browser.is_Opera ) {\\nhash = encodeURI( ' 'hash );\\n}\\nspt.last_hash = ' 'hash;\\nwindow.location.hash = ' 'hash;\\n}\\n}\\n}\\nthis.undo = function() ' '{\\nvar target_element = ' 'document.id(this.target_id);\\nEffects.fade_out(this.prev_target_id, ' '150);\\nvar server = ' 'TacticServerStub.get();\\n// display a ' 'table\\nwidget_class = ' '\\"tactic.ui.panel.ViewPanelWdg\\";\\nargs = ' '{\\n\\"search_type\\": ' 'this.prev_search_type,\\n\\"view\\": ' 'this.prev_view,\\n\\"search_view\\": ' 'this.prev_search_view\\n};\\nvar kwargs = ' "{'args': args};\\nwidget_html = " 'server.get_widget(widget_class, kwargs);\\n// ' 'Set the state of the page\\nkey = ' '\\"top_layout\\";\\npanel_name = ' '\\"main_body\\";\\nwidget_class = ' '\\"tactic.ui.panel.ViewPanelWdg\\";\\nserver.set_application_state(key, ' 'panel_name, widget_class, args);\\n// replace ' 'the former element with the new ' 'element\\nspt.behavior.replace_inner_html( ' 'target_element, widget_html ' ');\\nEffects.fade_in(this.prev_target_id, ' '150);\\n// set the url\\nvar hash = ' '\\"search_type=\\" + this.search_type + ' '\\"&view=\\" + ' 'this.view;\\nwindow.location.hash = ' 'hash;\\n}\\n}\\n// This occurs when you use ' 'the mouse wheel on the side bar. It causes ' 'the\\n// whole side bar to ' 'scroll\\n//\\nspt.side_bar.scroll = ' 'function(evt, bvr) {\\nvar property = ' '\\"margin-top\\";\\nvar margin = ' 'document.id(\\"side_bar_scroll\\").getStyle(property);\\nmargin ' '= parseInt(margin.replace(\\"px\\", ' '\\"\\"));\\nif (evt.wheel < 0) {\\nmargin -= ' '30;\\n}\\nelse {\\nmargin += 30;\\n}\\nif ' '(margin > 0) {\\nmargin = ' '0;\\ndocument.id(\\"side_bar_scroll_down\\").setStyle(\'display\', ' "'none');\\nvar pos = " 'document.id(window).getScroll();\\ndocument.id(window).scrollTo(pos.x, ' 'pos.y - 30);\\n}\\nelse ' '{\\ndocument.id(\\"side_bar_scroll_down\\").setStyle(\'display\', ' '\'block\');\\n}\\ndocument.id(\\"side_bar_scroll\\").setStyle(property, ' 'margin);\\n}\\n// This callback is called ' 'when clicking on a section link in the side ' 'bar.\\n// It toggles the display of a section ' 'and then sets the state\\n//\\n// bvr.dst_el: ' 'id of the section that is ' 'displayed\\nspt.side_bar.toggle_section_display_cbk ' '= function(evt, bvr)\\n{\\nvar click_el = ' 'document.id(bvr.src_el);\\n//hide el could be ' 'the section or div inside the section\\nif ' '(spt.has_class(click_el, ' "'spt_side_bar_element'))\\nvar hide_el = " 'click_el.getElement(\\".spt_side_bar_section_content\\");\\nelse\\nvar ' 'hide_el = spt.get_cousin(click_el, ' '\\".spt_side_bar_element\\", ' '\\".spt_side_bar_section_content\\");\\nbvr.slide_direction ' '= \\"vertical\\";\\nbvr.dst_el = ' 'hide_el;\\nvar arrow_img_el = ' "click_el.getElement('img');\\nvar " 'arrow_img_src = ' "arrow_img_el.get('src');\\nif( " 'arrow_img_src.match( /_right_/ ) ) ' "{\\narrow_img_el.set('src', " 'arrow_img_src.replace(/_right_/,\\"_down_\\"));\\nhide_el.setStyle(\\"display\\", ' '\\"block\\");\\nhide_el.setStyle(\\"margin-top\\", ' '\\"-\\"+hide_el.getSize().y+\\"px\\")\\nnew ' 'Fx.Tween(hide_el, ' '{duration:\\"short\\"}).start(\'margin-top\', ' '\\"0px\\");\\n}\\nelse ' "{\\narrow_img_el.set('src', " 'arrow_img_src.replace(/_down_/,\\"_right_\\"));\\nhide_el.setStyle(\\"margin-top\\", ' '\\"0px\\")\\nnew Fx.Tween(hide_el, ' '{duration:\\"short\\"}).start(\'margin-top\', ' '\\"-\\"+hide_el.getSize().y+\\"px\\");\\n//hide_el.setStyle(\\"display\\", ' '\\"none\\");\\n}\\nspt.side_bar.store_state();\\n}\\n//\\n// ' 'Side bar state methods\\n//\\n// Stores the ' 'state of the sidebar in a ' 'cookie.\\nspt.side_bar.cookie = ' 'null;\\nspt.side_bar.get_state = ' 'function()\\n{\\nif (spt.side_bar_cookie == ' 'null) {\\nspt.side_bar.cookie = new ' "Cookie('sidebar_status');\\n}\\nreturn " 'spt.side_bar.cookie;\\n}\\nspt.side_bar.store_state ' '= function()\\n{\\nvar elements = ' 'document.id(\\"side_bar\\").getElements(\\".spt_side_bar_section_content\\");\\nvar ' 'open_folders = {};\\nfor (var i = 0; i < ' 'elements.length; i++) {\\nvar element = ' 'elements[i];\\nif ( ' 'element.getStyle(\\"display\\") == ' '\\"block\\" ) {\\nvar path = ' 'element.getAttribute(\\"spt_path\\");\\nopen_folders[path] ' '= true;\\n}\\n}\\nvar state = ' 'spt.side_bar.get_state();\\nstate.write(JSON.stringify(open_folders))\\n}\\nspt.side_bar.restore_state ' '= function()\\n{\\nvar side_bar_el = ' 'document.id(\\"side_bar\\");\\nif( ! ' 'side_bar_el ) {\\nspt.js_log.warning( ' '\\"WARNING: in spt.side_bar.restore_state(), ' 'element with ID \'side_bar\' not found.\\" ' ');\\nreturn;\\n}\\nvar elements = ' 'side_bar_el.getElements(\\".spt_side_bar_section_content\\");\\nvar ' 'state = spt.side_bar.get_state();\\nvar ' 'open_folders = {};\\nif( state.read() ) ' '{\\nopen_folders = JSON.parse( state.read() ' ');\\n}\\nelse {\\nreturn;\\n}\\nfor (var i = ' '0; i < elements.length; i++) {\\nvar element ' '= elements[i];\\nvar path = ' 'element.getAttribute(\\"spt_path\\");\\n// ' 'Find the element with the arrow indicator for ' 'open or closed state of section ...\\nvar ' 'prev = ' 'document.id(element).getPrevious();\\nif ' '(!prev) continue;\\nvar arrow_img_el = ' 'prev.getElement(\\"img\\");\\nvar img_src = ' "arrow_img_el.get('src');\\nif " '(open_folders[path] == true) ' '{\\nelement.setStyle(\\"display\\", ' '\\"block\\");\\narrow_img_el.set(\'src\', ' 'img_src.replace(/_right_/,\\"_down_\\"));\\n}\\nelse ' '{\\nelement.setStyle(\\"display\\", ' '\\"none\\");\\narrow_img_el.set(\'src\', ' 'img_src.replace(/_down_/,\\"_right_\\"));\\n}\\n}\\n}\\n// ' 'action widget ' 'callback\\n//\\nspt.side_bar.manage_section_action_cbk ' '= function(element, view, is_personal) {\\n// ' 'get the value of the element\\nvar value = ' 'element.value;\\nif (value == \\"save\\") ' '{\\n// it could be saving other sub-views ' 'involved as well like reordering \\n// within ' 'the predefined views\\nif (confirm(\\"Save ' 'ordering of this view [\\" + view + \\"] ' '?\\") ) {\\nvar server = ' 'TacticServerStub.get();\\nserver.start({\\"title\\": ' '\\"Updating views\\"});\\nfor (changed_view ' 'in spt.side_bar.changed_views) {\\nvar ' 'search_type = ' '\\"SideBarWdg\\";\\nspt.side_bar.save_view(search_type, ' 'changed_view, ' 'is_personal);\\n}\\nspt.side_bar.changed_views ' '= ' '{};\\nserver.finish();\\nspt.panel.refresh(\\"side_bar\\");\\nspt.panel.refresh(\\"ManageSideBarBookmark_\\" ' '+ view);\\n}\\n}\\nelse if (value == ' '\\"predefined\\") ' "{\\nspt.popup.open('predefined_side_bar');\\n}\\nelse " 'if ( ' '[\\"new_link\\",\'new_folder\',\'new_separator\'].contains(value) ' ') {\\nspt.side_bar.context_menu_cbk(value, ' 'view, is_personal);\\n}\\nelse if (value == ' '\\"save_folder\\") {\\nvar popup_id = \\"New ' 'Item Panel\\";\\nvar values = ' 'spt.api.Utility.get_input_values(popup_id , ' 'null, false);\\n// Convert the user input new ' 'folder name all in lower case and replace all ' 'spaces with underscores.\\n//var new_title = ' "values['new_name'].toLowerCase().replace(/ " '/g,\\"_\\");;\\nvar new_title = ' "values['new_title'];\\nvar new_name = " "values['new_name']\\nif " '(spt.input.has_special_chars(new_name)) ' '{\\nalert(\\"The view name cannot contain ' 'special characters. Please try again.\\"); ' '\\nreturn;\\n}\\nif ' '(spt.input.start_with_num(new_name)) ' '{\\nalert(\\"A view starting with a number is ' 'not allowed.\\");\\nreturn;\\n}\\n// folder ' 'view cannot be one of the predefined ' "views\\nvar predefined_views = ['_my_tactic', " "'_preproduction','_asset_pipeline', " "'_shot_pipeline', '_site_admin', " "'_project_admin', '_overview', " "'_application', '_editorial', '_template', " "'definition', 'search', 'publish'];\\nif " '(predefined_views.contains(new_title)) ' "{\\nalert('This view name [' + new_name + '] " "is reserved');\\nreturn;\\n}\\n// don't " 'assign login for \\"project_view\\", but ' 'personal and project view \\n// share the ' 'same definition\\nvar kwargs = {};\\nvar ' 'kwargs2 = {};\\nif (is_personal) {\\nvar user ' '= ' "spt.Environment.get().get_user();\\nkwargs['login'] " "= user;\\nkwargs2['login'] = user;\\nnew_name " "= user + '.' + new_name;\\n} \\n// save this " 'user-defined view\\nvar server = ' 'TacticServerStub.get();\\nserver.start({\\"title\\": ' '\\"Adding folder\\", \\n\\"description\\": ' '\\"Adding folder [\\" + new_title + ' '\\"]\\"});\\nkwargs[\'class_name\'] ' "='SideBarSectionLinkWdg';\\nkwargs['element_attrs'] " "= {'title': " "new_title};\\nkwargs['display_options'] = " "{'view': " "new_name};\\nkwargs['auto_unique_name'] = " "false;\\nkwargs['auto_unique_view'] = " "false;\\nkwargs['unique'] = " 'true;\\ntry{ \\n// add it to the ' 'project_view\\nsearch_type = ' "'SideBarWdg';\\n// Order matters here\\n// " 'set an option to auto adjust the element_name ' 'to be unique\\nvar info = ' 'server.add_config_element(search_type, ' "'definition', new_name, kwargs);\\nvar " "unique_el_name = info['element_name'];\\n// " 'now add to project_view or ' 'my_view_...\\nserver.add_config_element(search_type, ' 'view, unique_el_name, kwargs2);\\n// only ' 'extract elements inside the folder view ' '\\"new_folder\\"\\nvar folder_elements = ' "spt.side_bar.get_elements('new_folder', " 'popup_id);\\nvar folder_element_names = ' '[];\\nfolder_elements.each( function(x) ' '\\n{folder_element_names.push(x.getAttribute(\\"spt_element_name\\"))});\\nif ' '(folder_element_names.length > ' '0)\\nserver.update_config(search_type, ' 'unique_el_name, folder_element_names, ' 'kwargs2);\\nserver.finish();\\n}\\ncatch(err) ' '{\\nvar error_str = ' 'spt.exception.handler(err);\\nalert(error_str);\\nserver.abort();\\nreturn;\\n}\\n//refresh ' '\\nspt.popup.destroy(popup_id);\\nspt.panel.refresh(\\"ManageSideBarBookmark_\\" ' '+ ' 'view);\\nspt.panel.refresh(\\"side_bar\\");\\n}\\nelse ' 'if (value == \\"save_link\\") {\\nvar ' 'popup_id = \\"New Item Panel\\";\\nvar values ' '= spt.api.Utility.get_input_values(popup_id , ' 'null, false);\\n// Convert the user input ' 'link title all in lower case and replace all ' 'spaces with underscores.\\nvar link_name = ' "values['new_link_title'].toLowerCase().replace(/ " '/g,\\"_\\");\\nvar include_search_view = ' 'values[\\"include_search_view\\"] == \'on\'; ' '\\nif ' '(spt.input.has_special_chars(link_name)) ' '{\\nalert(\\"The view name cannot contain ' 'special characters. Please try again.\\"); ' '\\nreturn;\\n}\\n// link name cannot be one ' 'of the predefined views\\nvar ' "predefined_views = ['_my_tactic', " "'_preproduction','_asset_pipeline', " "'_shot_pipeline', '_site_admin', " "'_project_admin', '_overview', " "'_application', '_editorial', '_template', " "'definition', 'search', " "'publish','edit','insert','edit_definition'];\\nif " '(predefined_views.contains(link_name)) ' "{\\nalert('This view name [' + link_name + '] " "is reserved');\\nreturn;\\n}\\nvar new_title " '= link_name;\\nvar search_type = ' "values['new_search_type'];\\nif (!link_name " "|| !search_type) {\\nalert('A title and a " 'search type are ' "required.');\\nreturn;\\n}\\nvar kwargs = " '{};\\nvar kwargs2 = {};\\nvar new_view = ' "values['new_link_view'];\\nif (is_personal) " '{\\nvar user = ' "spt.Environment.get().get_user();\\nkwargs['login'] " "= user;\\nkwargs2['login'] = " "user;\\nlink_name = user + '.' + " "link_name;\\n//new_view = user + '.' + " 'new_view;\\n}\\nif (confirm(\\"Save this link ' '[\\" + new_title + \\"] ?\\") ) {\\ntry ' '{\\nvar server = ' 'TacticServerStub.get();\\nserver.start({\\"title\\": ' '\\"Adding link\\",\\n\\"description\\": ' '\\"Adding link [\\" + new_title + ' '\\"]\\"});\\n//hard-code table view for ' "now\\nkwargs['class_name'] = " "'LinkWdg';\\nkwargs['element_attrs'] = " "{'title': new_title};\\nvar display_options " "= {'search_type': search_type, 'view': " 'new_view};\\nif (include_search_view) ' "{\\ndisplay_options['search_view'] = " "'link_search:' + new_view;\\n}\\n// special " 'case for CustomLayoutWdg\\nif (search_type == ' "'CustomLayoutWdg') {\\ndelete " "display_options['search_view'];\\ndelete " "display_options['search_type'];\\ndisplay_options['class_name'] " '= ' "'tactic.ui.panel.CustomLayoutWdg';\\n}\\nkwargs['display_options'] " '= ' "display_options;\\n//kwargs['auto_unique_name'] " "= true;\\nkwargs['unique'] = true;\\n// add " 'it to the view, if view is self personal ' 'view, add login\\nsearch_type = ' "'SideBarWdg';\\nvar info = " 'server.add_config_element(search_type, ' "'definition', link_name, kwargs);\\nvar " "unique_el_name = info['element_name'];\\n// " 'now add to ' 'project_view\\nserver.add_config_element(search_type, ' 'view, unique_el_name, ' 'kwargs2);\\nserver.finish();\\n//refresh ' '\\nspt.popup.destroy(popup_id);\\nspt.panel.refresh(\\"ManageSideBarBookmark_\\" ' '+ ' 'view);\\nspt.panel.refresh(\\"side_bar\\");\\n}\\ncatch(e) ' '{\\nalert(spt.exception.handler(e));\\n}\\n}\\n}\\nelse ' 'if (value == \\"save_separator\\") {\\nvar ' 'popup_id = \\"New Item Panel\\";\\nvar name = ' "'separator';\\nvar server = " 'TacticServerStub.get();\\nserver.start({\\"title\\": ' '\\"Adding separator\\"});\\nvar kwargs = ' "{'class_name' : " "'SeparatorWdg',\\n'element_attrs' : {'title': " "'Separator'},\\n'unique': " "false,\\n'auto_unique_name': " "true,\\n'auto_unique_view': true}; \\n// add " 'it to the project_view\\nsearch_type = ' "'SideBarWdg';\\nvar kwargs2 = {};\\n//have " 'login for the view, and definition\\nif ' '(is_personal){\\nvar user = ' "spt.Environment.get().get_user();\\nkwargs['login'] " "= user;\\nkwargs2['login'] = user;\\nname = " "user + '.' + name;\\n}\\nvar info = " 'server.add_config_element(search_type, ' "'definition', name, kwargs);\\nvar " "unique_el_name = info['element_name'];\\n// " 'now add to ' 'project_view\\nserver.add_config_element(search_type, ' 'view, unique_el_name, ' 'kwargs2);\\nserver.finish();\\n//refresh ' '\\nspt.popup.destroy(popup_id);\\nspt.panel.refresh(\\"ManageSideBarBookmark_\\" ' '+ ' 'view);\\nspt.panel.refresh(\\"side_bar\\");\\n}\\nelse ' '{\\nalert(\\"Unimplemented option: \\" + ' 'value);\\n}\\nelement.value = ' '\\"\\";\\n}\\n// save the changed ' 'views\\nspt.side_bar.save_view = ' 'function(search_type, view, is_personal, ' 'list_top) {\\n// backwards compatibility ' '(this is an id)\\nif (typeof(list_top) == ' "'undefined') {\\nvar elements;\\nif (view == " '\\"definition\\") {\\nelements = ' 'spt.side_bar.get_elements(view, ' '\\"menu_item_definition_list\\");\\n}\\nelse ' '{\\nelements = ' 'spt.side_bar.get_elements(view);\\n}\\n}\\nelse ' '{\\nelements = ' 'spt.side_bar.get_elements(view, ' 'list_top);\\n}\\nif (spt.side_bar.found_view ' '== false) {\\nreturn;\\n}\\nvar element_names ' '= [];\\nfor (var i = 0; i < elements.length; ' 'i++) {\\nvar element_name = ' 'elements[i].getAttribute(\\"spt_element_name\\");\\nelement_names.push(element_name);\\n}\\nvar ' 'server = TacticServerStub.get();\\n// will ' 'get unexpected results if multiple folders ' 'share the same view\\n//\\nvar kwargs = ' "{};\\nif (is_personal){\\nkwargs['login'] = " 'spt.Environment.get().get_user();\\n}\\n//add ' 'the trashed ' "items\\nkwargs['deleted_element_names'] = " 'spt.side_bar.trashed_items;\\nserver.update_config(search_type, ' 'view, element_names, ' 'kwargs);\\nspt.side_bar.trashed_items = ' '[];\\n}\\n// get all the elements of a ' 'specific view\\nspt.side_bar.found_view = ' 'false;\\nspt.side_bar.get_elements = ' 'function(view, list_id) {\\nif ' "(typeof(list_id) == 'undefined' || list_id == " 'null) {\\nlist_id = ' '\\"menu_item_list\\";\\n}\\nvar elements = ' 'document.id(list_id).getElements(\\".spt_side_bar_element\\");\\nif ' "(typeof(view) == 'undefined') {\\nreturn " 'elements;\\n}\\nspt.side_bar.found_view = ' 'false;\\nvar data = {};\\nfor (var i = 0; i < ' 'elements.length; i++) {\\nvar element = ' 'elements[i];\\nvar element_view = ' 'element.getAttribute(\\"spt_view\\");\\nif ' '(element_view == view) ' '{\\nspt.side_bar.found_view = true;\\n}\\n// ' 'ignore the dummy created when there are no ' 'elements\\nif ' '(element.hasClass(\\"spt_side_bar_dummy\\")) ' '{\\ncontinue;\\n}\\n// dynamically create the ' 'list\\nvar element_list = ' 'data[element_view];\\nif (element_list == ' 'null) {\\nelement_list = ' '[];\\ndata[element_view] = ' 'element_list;\\n}\\n//var element_name = ' 'elements[i].getAttribute(\\"spt_element_name\\");\\nelement_list.push(element);\\n}\\nif ' '(spt.side_bar.found_view) {\\nvar ' 'element_list = data[view];\\nif ' '(element_list)\\nreturn ' 'element_list;\\nelse\\nreturn [];\\n}\\nelse ' '{\\n// to prevent undefined from being ' 'returned\\nreturn [];\\n}\\n}\\n//\\n// Drag ' 'and drop actions for the ' 'elements\\n//\\nspt.side_bar.changed_views = ' '{};\\nspt.side_bar.trashed_items = ' '[];\\nspt.side_bar.active_elems = ' '{};\\nspt.side_bar.pp_setup = function(evt, ' 'bvr, mouse_411)\\n{ \\nvar clonable = ' 'bvr.src_el;\\nif (! ' 'clonable.hasClass(\\"spt_side_bar_element\\")) ' '{\\nclonable = ' "bvr.src_el.getParent('.spt_side_bar_element');\\n}\\n// " 'make sure that the src element is actually a ' 'side bar element.\\n//if (! ' 'bvr.src_el.hasClass(\\"spt_side_bar_element\\")) ' '{\\n// bvr.src_el = ' 'bvr.src_el.parentNode;\\n//}\\nvar ghost_el = ' 'document.id(bvr.drag_el);\\nif (!ghost_el) ' '{\\nvar ghost_el = ' 'spt.mouse._create_drag_copy( bvr.src_el ' ');\\nbvr.drag_el = ghost_el;\\n}\\nif( ' 'ghost_el )\\n{\\n// Make a clone of the ' 'source div that we clicked on to drag ' '...\\nvar src_copy = ' 'spt.behavior.clone(clonable);\\nvar w = ' 'clonable.clientWidth;\\nvar h = ' 'clonable.clientHeight;\\n// Use this if you ' 'want the initial ghost div position to be ' 'offset from mouse same as on mouse momve ' '...\\nghost_el.setStyle( \\"left\\", ' '(mouse_411.curr_x + 10) ' ');\\nghost_el.setStyle( \\"top\\", ' '(mouse_411.curr_y + 10) ' ');\\nghost_el.setStyle( \\"width\\", w ' ');\\nghost_el.setStyle( \\"height\\", h ' ');\\n// Then plug the clone div into the ' 'Utility ghost_el div to be the contents of ' 'the drop ...\\nghost_el.innerHTML = ' '\\"\\";\\nghost_el.appendChild( ' 'document.id(src_copy) );\\nghost_el.setStyle( ' '\\"display\\", \\"block\\" ' ');\\nghost_el.setStyle( \\"text-align\\", ' '\\"left\\" );\\n//ghost_el.setStyle( ' '\\"background\\", ' '\\"#4F4FC4\\");\\nghost_el.setStyle( ' '\\"box-shadow\\", \\"0px 0px 5px ' 'rgba(0,0,0,0.5)\\");\\n}\\nelse ' '{\\nspt.js_log.debug(\\"WARNING: NO ghost el ' 'found in spt.side_bar.pp_setup() ' 'callback!\\");\\n}\\n}\\nspt.side_bar.pp_motion ' '= function(evt, bvr, mouse_411)\\n{\\nvar ' 'ghost_el = document.id(bvr.drag_el);\\nif( ' 'ghost_el )\\n{\\nghost_el.setStyle( ' '\\"left\\", (mouse_411.curr_x + 10) ' ');\\nghost_el.setStyle( \\"top\\", ' '(mouse_411.curr_y + 10) );\\nvar elem = ' 'spt.side_bar.pp_find_drop_elem(evt, bvr, ' 'mouse_411);\\n//make the Trash can having a ' 'hard border\\nif ' '(spt.side_bar.pp_is_trash(elem))\\nspt.add_class(elem, ' "'look_menu_hover');\\nelse\\n{\\nelem = " "spt.side_bar.active_elems['trash'];\\nif " '(elem)\\nspt.remove_class(elem, ' "'look_menu_hover');\\n}\\n}\\n}\\n// Find " 'valid droppable ' 'element\\nspt.side_bar.pp_find_drop_elem = ' 'function(evt, bvr)\\n{\\n// find drop element ' 'inside out\\nvar found = false;\\nvar ' 'drop_on_el = ' 'spt.get_event_target(evt);\\nwhile( ' "drop_on_el ) {\\nif( ('getAttribute' in " 'drop_on_el) && ' 'drop_on_el.getAttribute(\\"SPT_ACCEPT_DROP\\") ' '== \\"manageSideBar\\" ) {\\nfound = ' 'true;\\nbreak;\\n}\\ndrop_on_el = ' 'drop_on_el.parentNode;\\n}\\nif ( found ' ')\\nreturn drop_on_el;\\nelse\\nreturn ' 'null;\\n}\\nspt.side_bar.pp_is_trash = ' 'function(drop_on_el)\\n{\\nif (drop_on_el && ' 'drop_on_el.hasClass(\\"spt_side_bar_trash\\") ' '== ' "true)\\n{\\nspt.side_bar.active_elems['trash'] " '= drop_on_el;\\nreturn true;\\n}\\nreturn ' 'false;\\n}\\nspt.side_bar.pp_action = ' 'function(evt, bvr)\\n{\\nvar ghost_el = ' 'bvr.drag_el;\\nif( ! ghost_el ) ' '{\\nreturn;\\n}\\n// Grab the cloned div that ' 'we had plugged in as the contents ' '(firstChild) of the ghost_el Utility div ' '...\\nvar ghost_content = ' 'ghost_el.removeChild( ghost_el.firstChild ' ');\\nghost_el.innerHTML = ' '\\"\\";\\nghost_el.style.display = ' '\\"none\\";\\n// find valid drop ' 'element\\nvar drop_on_el = ' 'spt.side_bar.pp_find_drop_elem(evt, ' 'bvr);\\nif (!drop_on_el)\\nreturn;\\nvar mode ' '= bvr.mode;\\nif (!mode) {\\n// look for ' 'parent\\nvar start_content = ' 'bvr.src_el.getParent(\\".spt_side_bar_content\\");\\nvar ' 'end_content = ' 'drop_on_el.getParent(\\".spt_side_bar_content\\");\\nif ' '(end_content == null) {\\nmode = ' '\\"move\\";\\n}\\nelse {\\nvar start_view = ' 'start_content.getAttribute(\\"spt_view\\");\\nvar ' 'end_view = ' 'end_content.getAttribute(\\"spt_view\\");\\nif ' '(start_view != end_view) {\\nmode = ' '\\"copy\\";\\n}\\nelse {\\nmode = ' '\\"move\\";\\n}\\n}\\n}\\nvar contents;\\nif ' '(mode == \\"copy\\") {\\ncontents = ' 'ghost_content;\\n}\\nelse {\\n// make sure ' 'that the contents is actually a side bar ' 'element.\\nvar contents = bvr.src_el;\\nif (! ' 'contents.hasClass(\\"spt_side_bar_element\\")) ' '{\\ncontents = ' "contents.getParent('.spt_side_bar_element');\\n}\\n}\\nvar " 'view;\\n// Record that the old view has ' 'changed if not in copy mode\\nvar old_view = ' 'contents.getAttribute(\\"spt_view\\")\\nif ' "(mode != 'copy') " '{\\nspt.side_bar.changed_views[old_view] = ' 'true;\\n}\\n// up one level if dropped on a ' 'section link\\nif ' '(drop_on_el.hasClass(\\"spt_side_bar_section_link\\"))\\ndrop_on_el ' '= ' 'drop_on_el.getParent(\\".spt_side_bar_section\\");\\n// ' 'if dropped on trash\\nif ' '(spt.side_bar.pp_is_trash(drop_on_el) ) ' '{\\nvar name = ' "contents.getAttribute('spt_element_name');\\nspt.side_bar.trashed_items.push(name);\\ncontents.destroy();\\nelem " "= spt.side_bar.active_elems['trash'];\\nif " '(elem)\\nspt.remove_class(elem, ' "'look_menu_hover');\\nreturn;\\n}\\n// if " 'dropped on a section or a section link\\nelse ' 'if( ' 'drop_on_el.hasClass(\\"spt_side_bar_section\\") ' ') {\\nvar children = ' 'drop_on_el.getElements(\\".spt_side_bar_element\\");\\nif ' '(children[0] != null && ' '!children[0].hasClass(\\"spt_side_bar_dummy\\")) ' '{\\ncontents.inject(children[0], ' "'before');\\nview = " 'children[0].getAttribute(\\"spt_view\\");\\n}\\nelse ' '{\\nvar container = ' 'drop_on_el.getElement(\\".spt_side_bar_section_content\\");\\ncontainer.appendChild(contents);\\n// ' 'get the view\\n// FIXME: assume view == ' 'element_name\\n//view = ' 'drop_on_el.getAttribute(\\"spt_view\\");\\nview ' '= ' 'drop_on_el.getAttribute(\\"spt_element_name\\");\\n}\\n}\\n// ' 'if dropped on a link\\nelse if ( ' 'drop_on_el.hasClass(\\"spt_side_bar_link\\") ' '== true ) {\\ncontents.inject(drop_on_el, ' "'before');\\nview = " 'drop_on_el.getAttribute(\\"spt_view\\");\\n}\\nelse ' 'if( ' 'drop_on_el.hasClass(\\"spt_section_top\\") ) ' '{\\nvar children = ' 'drop_on_el.getElements(\\".spt_side_bar_element\\");\\nvar ' 'last = ' 'children[children.length-1];\\ncontents.inject(last, ' "'after');\\nview = " 'last.getAttribute(\\"spt_view\\");\\n}\\n// ' 'if dropped on any other element\\nelse ' '{\\nvar parent = ' 'drop_on_el.getParent(\\".spt_side_bar_element\\");\\ncontents.inject(parent, ' "'before');\\nview = " 'parent.getAttribute(\\"spt_view\\");\\n}\\n// ' 'switch view\\nif (view == null) ' '{\\nalert(\\"view is ' 'NULL!!!!\\");\\n}\\n//\\nif (mode == ' "'copy') {\\nvar element_name = " 'contents.getAttribute(\\"spt_element_name\\");\\nvar ' 'element_title = ' 'contents.getAttribute(\\"spt_title\\");\\n//var ' 'content_view = base + \\"_\\" + ' 'element_name;\\nvar content_view = ' 'element_name;\\nif (content_view.substr(0,1) ' '== \\"_\\") {\\ncontent_view = ' 'content_view.substr(1, ' 'content_view.length);\\n}\\n// check to see ' 'what that there are no duplicate view ' 'titles\\nvar menu_item_list = ' 'contents.getParent(\\".spt_menu_item_list\\");\\nelements ' '= spt.side_bar.get_elements(view, ' 'menu_item_list);\\nelement_list = new ' 'Array();\\nfor (var i = 0; i < ' 'elements.length; i++) {\\nvar ' 'cur_element_name = ' 'elements[i].getAttribute(\\"spt_element_name\\");\\npat ' "= new RegExp( '^' + element_name+ " "'\\\\d*');\\nif (cur_element_name.match(pat)) " '{\\nelement_list.push(cur_element_name);\\n}\\n}\\nif ' '(element_list.length > 0) {\\ncontent_view = ' 'content_view + ' 'element_list.length;\\nelement_title = ' 'element_title + ' 'element_list.length;\\n}\\ncontents.setAttribute(\\"spt_element_name\\", ' 'content_view);\\ncontents.setAttribute(\\"spt_title\\", ' 'element_title);\\n// set the new view of the ' 'element\\ncontents.setAttribute(\\"spt_view\\", ' 'view);\\n// go through the elements names and ' 'change them to the new view\\nvar elements = ' 'contents.getElements(\\".spt_side_bar_element\\");\\nfor ' '(var i = 0; i < elements.length; i++) {\\nvar ' 'element = ' 'elements[i];\\nelement.setAttribute(\\"spt_view\\", ' 'content_view);\\n}\\n// change the ' 'title\\nvar title = ' 'contents.getElement(\\".spt_side_bar_title\\");\\nif ' '(title){\\nvar title_icon = ' 'title.getFirst();\\nif (!title_icon) ' '{\\ntitle.innerHTML = element_title;\\n} else ' '{\\ntitle.innerHTML = ' "'';\\ntitle.appendChild(title_icon);\\ntitle.appendText(element_title);\\n}\\n}\\nspt.side_bar.changed_views[view] " '= true;\\n}\\nelse {\\n// set the new view of ' 'the ' 'element\\ncontents.setAttribute(\\"spt_view\\", ' 'view);\\nspt.side_bar.changed_views[view] = ' 'true;\\n}\\nif( bvr.class_name ) ' '{\\nspt.side_bar.display_element_info_cbk(evt,bvr);\\n}\\n}\\nspt.side_bar.context_menu_cbk ' '= function(action, view, is_personal) {\\nvar ' 'element_name = null;\\n/*\\nconfig = ' "document.createElement('config')\\nelement = " "document.createElement('element')\\ndisplay " '= ' "document.createElement('display')\\nconfig.appendChild(element);\\nelement.appendChild(display);\\n*/\\nif " '(action == \\"new_link\\") {\\nelement_name = ' '\\"new_link\\";\\n}\\nelse if (action == ' '\\"new_folder\\") {\\nelement_name = ' '\\"new_folder\\";\\n}\\nelse if (action == ' '\\"new_separator\\") {\\nelement_name = ' '\\"new_separator\\";\\n}\\nif (element_name) ' '{\\nvar clone = ' 'spt.side_bar.add_new_item(view, ' "element_name);\\n//clone.setStyle('background', " "'#6CB87B');\\nif (element_name " "=='new_separator') " "{\\nspt.side_bar.manage_section_action_cbk({'value':'save_separator'},view, " 'is_personal);\\n}\\n}\\n}\\nspt.side_bar.add_new_item ' '= function(view, element_name, template_top) ' '{\\nvar list_id = \\"menu_item_list\\";\\nvar ' "options = {'type': element_name, 'view': " 'view};\\nvar popup_id = \\"New Item ' 'Panel\\";\\nnew_item_class = ' "'tactic.ui.panel.ManageViewNewItemWdg';\\nspt.panel.load_popup(popup_id, " "'tactic.ui.panel.ManageViewNewItemWdg', " 'options, {});\\n// get the template menu ' 'items\\n// index is prone to error, use ' 'element_name instead\\nif ( ' "typeof(template_top) == 'undefined' ) " '{\\ntemplate_top = ' 'document.id(\\"menu_item_template\\");\\n}\\nvar ' 'menu_item = ' 'template_top.getElement(\\"div[spt_element_name=\\" ' '+ element_name +\\"]\\");\\nif ' '(!menu_item)\\nreturn;\\nvar clone = ' 'spt.behavior.clone(menu_item);\\n// get the ' 'element and inject after\\nvar div = ' "document.id(popup_id).getElement('.spt_new_item');\\ndiv.appendChild(clone);\\n// " 'now add some properties to the new ' 'element\\nif (element_name ' '=\'new_folder\')\\nclone.addClass(\\"spt_side_bar_section\\");\\nelse\\nclone.addClass(\\"spt_side_bar_element\\");\\nclone.setAttribute(\\"spt_view\\", ' 'view);\\n// get the current name of the ' 'cloned element\\nvar clone_name = ' 'clone.getAttribute(\\"spt_element_name\\");\\nbvr ' '= {};\\nbvr.src_el = clone;\\nreturn ' 'clone;\\n}\\n//\\n// Element info setting and ' 'saving\\n//\\nspt.side_bar.display_element_info_cbk ' '= function(evt, bvr)\\n{\\nvar top = ' 'bvr.src_el.getParent(\\".spt_view_manager_top\\");\\nif ' '(!top)\\nreturn;\\nvar detail_panel = ' 'top.getElement(\\".spt_view_manager_detail\\");\\nvar ' 'src_el = bvr.src_el;\\nvar element_name = ' 'src_el.getAttribute(\\"spt_element_name\\");\\nif ' '(element_name == null) {\\nsrc_el = ' 'src_el.getParent(\\".spt_side_bar_element\\");\\nelement_name ' '= ' 'src_el.getAttribute(\\"spt_element_name\\");\\n}\\nvar ' 'search_type = ' 'detail_panel.getAttribute(\\"spt_search_type\\");\\nvar ' 'personal = ' 'detail_panel.getAttribute(\\"spt_personal\\");\\nvar ' 'view = ' 'src_el.getAttribute(\\"spt_view\\");\\nvar ' 'path = ' 'src_el.getAttribute(\\"spt_path\\");\\nvar ' 'login = ' 'detail_panel.getAttribute(\\"spt_login\\");\\nvar ' 'is_default = ' 'src_el.getAttribute(\\"spt_default\\");\\nvar ' 'config_xml = bvr[\\"config_xml\\"];\\n// ' 'rename\\nif (config_xml) {\\n//it could be ' 'double or single quotes\\nvar pat = new ' "RegExp('(.*element " '.*name=(?:\\\\\\"|\\\\\'))([^\\\\\\\\s\\\\\\\\t]*)((?:\\\\\\"|\\\\\').*)\')\\nvar ' 'm = config_xml.match(pat);\\nif (m) ' "{\\nconfig_xml = config_xml.replace(pat, '$1' " "+ element_name +'$3');\\n}\\n}\\nelse " "{\\nconfig_xml = '';\\n}\\nvar server = " 'TacticServerStub.get();\\nvar class_name = ' 'bvr.class_name;\\nvar options = ' Error: No module named 'spt' -------------------------------------------------- By the way, some more minor errors: GET http://MYSRV/plugins/pdfjs/web/viewer.js?ver=4.8.0.a01 net::ERR_ABORTED 404 (Not Found) GET http://MYSRV/plugins/pdfjs/build/pdf.js?ver=4.8.0.a01 net::ERR_ABORTED 404 (Not Found) ------------- xmlrpc.js?ver=4.8.0.a01:115 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. Connection.post @ xmlrpc.js?ver=4.8.0.a01:115 AjaxService.invoke @ xmlrpc.js?ver=4.8.0.a01:172 TacticServerStub._delegate @ client_api.js?ver=4.8.0.a01:2076 TacticServerStub.get_widget @ client_api.js?ver=4.8.0.a01:1566 spt.hash.onload_first @ spt_onload_startup.js?ver=4.8.0.a01:247 spt.onload_startup @ spt_onload_startup.js?ver=4.8.0.a01:40 onload @ (index):67 RE: async_get_widget: Server Error: No module named 'spt' - remkonoteboom - 04-28-2020 This error (which I believe most of the others area related): Uncaught TypeError: $(...).bmdRipples is not a function is because we have yet to internalize the jquery and boostrap-material-design javascript libraries. If you inspect the header of TACTIC, you will see that they are still referencing external sites. This is not ideal, of course and we will copy those into the source. It usually doesn't affect anything (especially on development) but I have seen this error before and it seems to be because request those sites sometimes don't always 100% work. Not sure why, but internalizing these libraries will fix the problem. Usually this problem is sporadic and a couple of reloads clears it up (or inspect the header and force release the bootstrap-material-design js file). I think these sites do this on purpose to discourage people from using these links in production. RE: async_get_widget: Server Error: No module named 'spt' - listy - 04-29-2020 This all make sense. But what about this error "Error: No module named 'spt'" ? This is happening when i try to open any table. RE: async_get_widget: Server Error: No module named 'spt' - remkonoteboom - 04-29-2020 That looks like a server side error (not javascript). "spt" main module is a root module of many of our internal plugins. It may be that, for whatever reason, 4.8 is referencing one of these modules. Do you have a server side stack trace when this error is made? RE: async_get_widget: Server Error: No module named 'spt' - listy - 04-29-2020 (04-29-2020, 02:50 PM)remkonoteboom Wrote: Do you have a server side stack trace when this error is made?Yes, i have posted it earlier RE: async_get_widget: Server Error: No module named 'spt' - remkonoteboom - 04-29-2020 Hi. I know you posted one with the following ... File "/home/apache/tactic/src/pyasm/search/search.py", line 229, in __init__ raise SearchException('This database [%s] does not exist' %self.database) pyasm.search.search.SearchException: This database [sthpw] does not exist However, this is not the stack trace that is producing the error: "No module named 'spt'". It is possible that this is an effect of a previous error. This happens sometimes where, for whatever reason, a stack trace causes another cascade of stack traces that get dumped to the console. Usually, it is the first stack trace that matters. The long output does have the error at the bottom from the get_widget function, but there is no stack trace ... it's just a function output. One of the reasons it's difficult to find is because we have a client side javascript namespace "spt" and also a server one, so searching for it is difficult because of the hundreds of references to the javascript "spt" RE: async_get_widget: Server Error: No module named 'spt' - listy - 04-30-2020 Hi! I thought stderr.log and stdout.log prints the same as startup_dev.py. I executed startup_dev, and here are the stacktraces: -------------------------------------------------- File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 583, in new cmd.execute_cmd(cmd) File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 194, in execute_cmd cmd.execute() File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 171, in execute self2.results = exec_meth(self, ticket, meth, args) File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 306, in exec_meth results = meth(self, ticket, *new_args, **kwargs) File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 5592, in get_widget widget = ExceptionWdg(e) File "/home/apache/tactic/src/pyasm/widget/web_wdg.py", line 3527, in __init__ super(ExceptionWdg, self).__init__(self) File "/home/apache/tactic/src/pyasm/web/widget.py", line 128, in __init__ self.init() File "/home/apache/tactic/src/pyasm/widget/web_wdg.py", line 3593, in init from spt.modules.workflow import Workflow Error: No module named 'spt' -------------------------------------------------- -------------------------------------------------- WARNING CherryPyStartup: 'Index' object has no attribute 'plugins' WARNING: status: 404 Not Found message: The path '/tactic/plugins/pdfjs/build/pdf.js' was not found. site: project_code: plugins ERROR: 'ActionButtonWdg' object has no attribute 'add_event' WARNING CherryPyStartup: 'Index' object has no attribute 'plugins' WARNING: status: 404 Not Found message: The path '/tactic/plugins/pdfjs/web/viewer.js' was not found. site: project_code: plugins ERROR: 'ActionButtonWdg' object has no attribute 'add_event' -------------------------------------------------- And one more things: tactic.ui.table.HiddenRowElementWdg - isn't expanding in a row (TACTIC 4.8) Projects choose menu in the right corner - the menus cascading on the top of prevous, so confuising... Left menu sidebar, it is'n scrollable on mobile browsers. Bug when trying to save column definition with HiddenRowElementWdg widget: -------------------------------------------------- File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 583, in new cmd.execute_cmd(cmd) File "/home/apache/tactic/src/pyasm/command/command.py", line 267, in execute_cmd ret_val = cmd.execute() File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 274, in execute self2.results = exec_meth(self, ticket, meth, args) File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 304, in exec_meth results = meth(self, ticket, *new_args) File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 5802, in execute_cmd Command.execute_cmd(cmd) File "/home/apache/tactic/src/pyasm/command/command.py", line 267, in execute_cmd ret_val = cmd.execute() File "/home/apache/tactic/src/tactic/ui/manager/element_definition_wdg.py", line 3107, in execute self.save(self.search_type, view, self.element_name, widget_key, display_class) File "/home/apache/tactic/src/tactic/ui/manager/element_definition_wdg.py", line 3209, in save options = self.get_options("option") File "/home/apache/tactic/src/tactic/ui/manager/element_definition_wdg.py", line 3349, in get_options hidden_class = web.get_form_values("xxx_%s|display_class" % prefix)[1] Error: list index out of range -------------------------------------------------- When trying to open help: Error processing document: 'str' object has no attribute 'decode' Source: book/doc/doc_tactic-end-user/html/ar01s06.html#_creating_tasks And REALLY serious question! How to use modern material design icons? The CHOOSE button it the side-bar editing isn't working by the way. When adding new separator: -------------------------------------------------- File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 583, in new cmd.execute_cmd(cmd) File "/home/apache/tactic/src/pyasm/command/command.py", line 267, in execute_cmd ret_val = cmd.execute() File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 274, in execute self2.results = exec_meth(self, ticket, meth, args) File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 304, in exec_meth results = meth(self, ticket, *new_args) File "/home/apache/tactic/src/pyasm/prod/service/api_xmlrpc.py", line 6374, in add_config_element raise UserException('This view name [%s] is reserved for internal use.'%name) Error: This view name [separator] is reserved for internal use. -------------------------------------------------- RE: async_get_widget: Server Error: No module named 'spt' - listy - 04-30-2020 In 4.8 Schema also do not bring dialogs when i try to connect nodes! Uncaught TypeError: Cannot read property 'getElement' of null at run_bvr (eval at spt.behavior.run_cbjs (behavior.js?ver=4.8.0.a01:254), <anonymous>:21:22) at Object.spt.behavior.run_cbjs (behavior.js?ver=4.8.0.a01:259) at Object.spt.named_events._execute_listeners (events.js?ver=4.8.0.a01:153) at Object.spt.named_events.fire_event (events.js?ver=4.8.0.a01:224) at Object.spt.pipeline.drag_connector_action (eval at spt.behavior.run_cbjs (behavior.js?ver=4.8.0.a01:254), <anonymous>:1628:18) at eval (eval at spt.behavior.run_callback_fn (behavior.js?ver=4.8.0.a01:310), <anonymous>:1:60) at Object.spt.behavior.run_callback_fn (behavior.js?ver=4.8.0.a01:310) at HTMLDocument.up_handler (mouse.js?ver=4.8.0.a01:646) |