{"action":"closed","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/3287","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/3287/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/3287/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/3287/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/3287","id":68213183,"number":3287,"title":"Resources not being included in the correct order or at the correct location","user":{"login":"orchardbot","id":11788683,"avatar_url":"https://avatars.githubusercontent.com/u/11788683?v=3","gravatar_id":"","url":"https://api.github.com/users/orchardbot","html_url":"https://github.com/orchardbot","followers_url":"https://api.github.com/users/orchardbot/followers","following_url":"https://api.github.com/users/orchardbot/following{/other_user}","gists_url":"https://api.github.com/users/orchardbot/gists{/gist_id}","starred_url":"https://api.github.com/users/orchardbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orchardbot/subscriptions","organizations_url":"https://api.github.com/users/orchardbot/orgs","repos_url":"https://api.github.com/users/orchardbot/repos","events_url":"https://api.github.com/users/orchardbot/events{/privacy}","received_events_url":"https://api.github.com/users/orchardbot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OrchardCMS/Orchard/labels/resolved","name":"resolved","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/milestones/15","html_url":"https://github.com/OrchardCMS/Orchard/milestones/Orchard%201.7","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/milestones/15/labels","id":1065773,"number":15,"title":"Orchard 1.7","description":"Please read our release notes for Orchard 1.7:\n[url:http://docs.orchardproject.net/Documentation/Orchard-1-7-Release-Notes]\n\n*Please* do not post questions as reviews. Questions should be posted in the Discussions tab, where they will usually get promptly responded to. If you post a question as a review, you will pollute the rating, and you won't get an answer.","creator":{"login":"orchardbot","id":11788683,"avatar_url":"https://avatars.githubusercontent.com/u/11788683?v=3","gravatar_id":"","url":"https://api.github.com/users/orchardbot","html_url":"https://github.com/orchardbot","followers_url":"https://api.github.com/users/orchardbot/followers","following_url":"https://api.github.com/users/orchardbot/following{/other_user}","gists_url":"https://api.github.com/users/orchardbot/gists{/gist_id}","starred_url":"https://api.github.com/users/orchardbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orchardbot/subscriptions","organizations_url":"https://api.github.com/users/orchardbot/orgs","repos_url":"https://api.github.com/users/orchardbot/repos","events_url":"https://api.github.com/users/orchardbot/events{/privacy}","received_events_url":"https://api.github.com/users/orchardbot/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":105,"state":"closed","created_at":"2015-04-13T19:41:11Z","updated_at":"2015-04-13T22:57:14Z","due_on":"2013-07-16T07:00:00Z","closed_at":"2015-04-13T19:41:11Z"},"comments":3,"created_at":"2013-02-14T13:02:28Z","updated_at":"2015-04-13T22:57:14Z","closed_at":"2015-04-13T22:57:14Z","body":"__paynecrl97__ created:\r\nhttps://orchard.codeplex.com/workitem/19458\r\n\r\nI know this has been raised before, but those issues have been closed without resolution.\r\n\nThere is a bug with the way that Orchard includes external resources. I experience this with Orchard 1.6.\r\n\nI have a page with the following declarations:\n    Script.Include(\"RealmCanvas/libs/greensock/TweenMax.min.js\").AtHead();\n    Script.Include(\"RealmCanvas/libs/greensock/plugins/EaselPlugin.min.js\").AtHead();\n    Script.Include(\"RealmCanvas/libs/easeljs-0.5.0.min.js\").AtHead();\n    Script.Include(\"RealmCanvas/libs/tweenjs-0.3.0.min.js\").AtHead();\n    Script.Include(\"RealmCanvas/libs/movieclip-0.5.0.min.js\").AtHead();\n    Script.Include(\"RealmCanvas/libs/preloadjs-0.2.0.min.js\").AtHead();\n    Script.Include(\"RealmCanvas/libs/soundjs.js\").AtHead();\n\n\n    Script.Include(\"RealmCanvas/filters/Filter.js\").AtHead();\n    Script.Include(\"RealmCanvas/filters/BoxBlurFilter.js\").AtHead();\n    Script.Include(\"RealmCanvas/filters/ColorFilter.js\").AtHead();\n\n    Script.Include(\"RealmCanvas/Version.js\").AtHead();\n    Script.Include(\"RealmCanvas/Debug.js\").AtHead();\n    Script.Include(\"RealmCanvas/ScreenConsole.js\").AtHead();\n    Script.Include(\"RealmCanvas/IslandData.js\").AtHead();\n    Script.Include(\"RealmCanvas/Assets.js\").AtHead();\n    Script.Include(\"RealmCanvas/Rays.js\").AtHead();\n    Script.Include(\"RealmCanvas/LoadingIndicator.js\").AtHead();\n    Script.Include(\"RealmCanvas/IntroClouds.js\").AtHead();\n    Script.Include(\"RealmCanvas/FPSCounter.js\").AtHead();\n    Script.Include(\"RealmCanvas/Utils.js\").AtHead();\n    Script.Include(\"RealmCanvas/SimpleParticle.js\").AtHead();\n    Script.Include(\"RealmCanvas/SimpleParticleSystem.js\").AtHead();\n\n    Script.Include(\"RealmCanvas/Island.js\").AtHead();\n    Script.Include(\"RealmCanvas/ParallaxLayer.js\").AtHead();\n    Script.Include(\"RealmCanvas/ParallaxEngine.js\").AtHead();\n\n\n    Script.Include(\"RealmCanvas/Backdrop.js\").AtHead();\n    Script.Include(\"RealmCanvas/assets/Arrows.js\").AtHead();\n\nThis gets resolved as:\n<script src=\"/OrchardLocal/Modules/GRMS/Scripts/easeljs-0.5.0.min.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/Scripts/tweenjs-0.3.0.min.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/Scripts/movieclip-0.5.0.min.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/Scripts/soundjs.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/Scripts/LoadingIndicator.js\" type=\"text/javascript\"></script>\n<!--[if lt IE 9]>\n<script src=\"/OrchardLocal/Core/Shapes/Scripts/html5.js\" type=\"text/javascript\"></script>\n<![endif]-->\n<meta content=\"Orchard\" name=\"generator\" />\n<link href=\"/OrchardLocal/modules/orchard.themes/Content/orchard.ico\" rel=\"shortcut icon\" type=\"image/x-icon\" />\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/libs/greensock/TweenMax.min.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/libs/greensock/plugins/EaselPlugin.min.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/libs/preloadjs-0.2.0.min.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/filters/Filter.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/filters/BoxBlurFilter.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/filters/ColorFilter.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/Version.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/Debug.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/ScreenConsole.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/IslandData.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/Assets.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/Rays.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/IntroClouds.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/FPSCounter.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/Utils.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/SimpleParticle.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/SimpleParticleSystem.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/Island.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/ParallaxLayer.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/ParallaxEngine.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/Backdrop.js\" type=\"text/javascript\"></script>\n<script src=\"/OrchardLocal/Modules/GRMS/scripts/RealmCanvas/assets/Arrows.js\" type=\"text/javascript\"></script>\n\n\n\nNote that the scripts are rendered in two distinct blocks- separated by a conditional include, a meta tag and a link tag. This causes the scripts to be rendered in the incorrect order- i.e. the scripts that appear in the first block appear on the page before they should. This causes JS errors on the page if objects in one script depend on another that has incorrectly been loaded after the dependent script.\r\n\nAlso note that the scripts in the first block reference different file paths to those that have been specified- i.e. the scripts that are referenced are not within the RealmCanvas folder as they should be.\r\n\nThe five scripts in the first block reference scripts in the root of the scripts folder with the same name. Removing the script in the root of the script folder will cause Orchard to render the script tag in the correct location in the document, and with the correct path to the file.\n"}}