{"action":"opened","issue":{"url":"https://api.github.com/repos/dnnsoftware/Dnn.AdminExperience.Library/issues/150","repository_url":"https://api.github.com/repos/dnnsoftware/Dnn.AdminExperience.Library","labels_url":"https://api.github.com/repos/dnnsoftware/Dnn.AdminExperience.Library/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/dnnsoftware/Dnn.AdminExperience.Library/issues/150/comments","events_url":"https://api.github.com/repos/dnnsoftware/Dnn.AdminExperience.Library/issues/150/events","html_url":"https://github.com/dnnsoftware/Dnn.AdminExperience.Library/issues/150","id":331218662,"node_id":"MDU6SXNzdWUzMzEyMTg2NjI=","number":150,"title":"Evoq Site Settings modules' load is not synchronized","user":{"login":"tpluscode","id":588128,"node_id":"MDQ6VXNlcjU4ODEyOA==","avatar_url":"https://avatars0.githubusercontent.com/u/588128?v=4","gravatar_id":"","url":"https://api.github.com/users/tpluscode","html_url":"https://github.com/tpluscode","followers_url":"https://api.github.com/users/tpluscode/followers","following_url":"https://api.github.com/users/tpluscode/following{/other_user}","gists_url":"https://api.github.com/users/tpluscode/gists{/gist_id}","starred_url":"https://api.github.com/users/tpluscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpluscode/subscriptions","organizations_url":"https://api.github.com/users/tpluscode/orgs","repos_url":"https://api.github.com/users/tpluscode/repos","events_url":"https://api.github.com/users/tpluscode/events{/privacy}","received_events_url":"https://api.github.com/users/tpluscode/received_events","type":"User","site_admin":false},"labels":[{"id":961290534,"node_id":"MDU6TGFiZWw5NjEyOTA1MzQ=","url":"https://api.github.com/repos/dnnsoftware/Dnn.AdminExperience.Library/labels/esw","name":"esw","color":"f0f0f0","default":false}],"state":"open","locked":false,"assignee":{"login":"mean2me","id":29707773,"node_id":"MDQ6VXNlcjI5NzA3Nzcz","avatar_url":"https://avatars0.githubusercontent.com/u/29707773?v=4","gravatar_id":"","url":"https://api.github.com/users/mean2me","html_url":"https://github.com/mean2me","followers_url":"https://api.github.com/users/mean2me/followers","following_url":"https://api.github.com/users/mean2me/following{/other_user}","gists_url":"https://api.github.com/users/mean2me/gists{/gist_id}","starred_url":"https://api.github.com/users/mean2me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mean2me/subscriptions","organizations_url":"https://api.github.com/users/mean2me/orgs","repos_url":"https://api.github.com/users/mean2me/repos","events_url":"https://api.github.com/users/mean2me/events{/privacy}","received_events_url":"https://api.github.com/users/mean2me/received_events","type":"User","site_admin":false},"assignees":[{"login":"mean2me","id":29707773,"node_id":"MDQ6VXNlcjI5NzA3Nzcz","avatar_url":"https://avatars0.githubusercontent.com/u/29707773?v=4","gravatar_id":"","url":"https://api.github.com/users/mean2me","html_url":"https://github.com/mean2me","followers_url":"https://api.github.com/users/mean2me/followers","following_url":"https://api.github.com/users/mean2me/following{/other_user}","gists_url":"https://api.github.com/users/mean2me/gists{/gist_id}","starred_url":"https://api.github.com/users/mean2me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mean2me/subscriptions","organizations_url":"https://api.github.com/users/mean2me/orgs","repos_url":"https://api.github.com/users/mean2me/repos","events_url":"https://api.github.com/users/mean2me/events{/privacy}","received_events_url":"https://api.github.com/users/mean2me/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-11T14:41:16Z","updated_at":"2018-06-11T14:41:16Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Description\r\n\r\nIn PB -> SiteSettings -> Search of Evoq we have two extra tabs: **Crawiling** and **File Extensions**.\r\n\r\nThese two extra tabs come from Dnn.AdminExperience.Evoq.Basic and they are injected into the main SiteSettings module defined in Dnn.AdminExperience.Extensions.\r\nThe way this extension works is totally unreliable since it is based on two single and not-dependent asynchronous calls, as shown in this code snippet:\r\n\r\n```js\r\nvar init = function (wrapper, util, params, callback) {\r\n\r\n        window.dnn.initSiteSettings = function initializeSiteSettings() {\r\n            return {\r\n                utility: util,\r\n                siteRoot: config.siteRoot,\r\n                settings: params.settings,\r\n                moduleName: 'EvoqSiteSettings',\r\n                identifier: params.identifier\r\n            };\r\n        };\r\n\r\n        window.dnn.SiteSettings = {};\r\n\r\n        util.loadBundleScript('modules/dnn.sitesettings/scripts/bundles/evoq-site-settings-bundle.js');\r\n\r\n        wrapper.on('init.extension', function () {\r\n            if (!window.dnn.SiteSettings.bundleLoaded) {\r\n                setTimeout(function () {\r\n                    util.loadBundleScript('modules/dnn.sitesettings/scripts/bundles/site-settings-bundle.js');\r\n                }, 0);\r\n            }\r\n        });\r\n\r\n        if (typeof callback === \"function\") {\r\n            callback();\r\n        }\r\n    };\r\n```\r\n\r\nHere is the source on GitHub: https://github.com/trilogy-group/Dnn.AdminExperience.Evoq.Basic/blob/4f252625334f8937cdb8106ae6eecead3940b8b5/src/Modules/Evoq.PersonaBar.SiteSettings/admin/personaBar/scripts/EvoqSiteSettings.js#L9\r\n\r\n## Current behavior\r\n\r\n- Sometimes the site-settings-bundle.js is loaded before evoq-site-settings-bundle. In this case, errors appears in the browser console and the two extra tabs (Crawiling and File Extensions) are not injected into the application.\r\n- Even retrying to reload many times is not sure that extra tabs will appear, since the load sequence of the two bundles is not managed at all.\r\n- To prevent this issue (partially and badly), a setTimeout by 500ms was set in the bootstrap of Evoq Site Settings React project. It has been fixed by Dnn.AdminExperience.Extensions#511\r\n\r\n## Expected behavior\r\n\r\n- `evoq-site-settings-bundle.js` should be loaded before `site-settings-bundle.js`, being it a dependency\r\n- `site-settings-bundle.js` should be loaded only once its dependency has been loaded\r\n- dependencies must not have any asynchronous initialization code, to avoid unpredictable behaviors"}}
{"actor":{"display_login":"tpluscode"}}