Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel 9 posts 80 karma points
    Dec 11, 2017 @ 11:04
    Daniel
    0

    Backoffice is not loading when a plugin.manifest for a development plugin is present

    Hello,

    In all the tutorials that I have found for developing a custom backoffice extension they were using a single project in Visual Studio. I've developed this extension and it worked fine.

    However, I wanted to split this in 2 projects: an empty project with an empty instalation of umbraco and the backoffice one. For this, I made some tasks which automates the build, and it copies what is required in the Umbraco installation folder.

    In the App_Plugins\Extension i have:

    • backoffice
    • lang
    • package.manifest

    However when the package.manifest file is present, the backoffice is not loading (it's an empty page). If I clear the folder and delete it, it loads again.

    I've made various tests, and the bahavior is:

    • it works if the package.manifest is not present or the javascript node array is empty
    • it does not load the backoffice interface if there is no javascript there, or if it's a file which does not exists on disk

    I've tried with a single javascript file to test and it crash. I list here the sample.js file:

    (function () {
        var app = angular.module("umbraco");
    
        //These are my Angular modules that I want to inject/require
        app.requires.push('relativeDate');
    })();
    
    
    jQuery.deparam = function (querystring) {
        // remove any preceding url and split
        querystring = querystring.substring(querystring.indexOf('?') + 1).split('&');
        var params = {}, pair, d = decodeURIComponent, i;
        // march and parse
        for (i = querystring.length; i > 0;) {
            pair = querystring[--i].split('=');
            params[d(pair[0])] = d(pair[1]);
        }
    
        return params;
    };//-- 
    

    Here is the package.manifest

    {
      "javascript": [
        "~/App_Plugins/CleverServer/backoffice/imports.js"
      ],
      "css": [
      ]
    }
    

    I will list the log, however it is no difference when the backoffice starts or ends

      2017-12-11 12:40:35,582 [P12484/D2/T1] INFO  Umbraco.Core.CoreBootManager - Umbraco 7.7.4 application starting on DANIEL-PC
     2017-12-11 12:40:35,615 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Determining hash of code files on disk
     2017-12-11 12:40:35,626 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Hash determined (took 10ms)
     2017-12-11 12:40:35,684 [P12484/D2/T1] INFO  Umbraco.Core.MainDom - Acquiring MainDom...
     2017-12-11 12:40:35,685 [P12484/D2/T1] INFO  Umbraco.Core.MainDom - Acquired MainDom.
     2017-12-11 12:40:35,686 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IDiscoverable
     2017-12-11 12:40:35,947 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IDiscoverable (took 260ms)
     2017-12-11 12:40:35,948 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IApplicationStartupHandler
     2017-12-11 12:40:35,953 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IApplicationStartupHandler (took 5ms)
     2017-12-11 12:40:35,968 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IDiscoverable
     2017-12-11 12:40:35,969 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IDiscoverable (took 0ms)
     2017-12-11 12:40:35,969 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter
     2017-12-11 12:40:35,973 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter (took 4ms)
     2017-12-11 12:40:35,974 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IDiscoverable
     2017-12-11 12:40:35,974 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IDiscoverable (took 0ms)
     2017-12-11 12:40:35,974 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving Umbraco.Core.PropertyEditors.IPropertyValueConverter
     2017-12-11 12:40:35,979 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved Umbraco.Core.PropertyEditors.IPropertyValueConverter (took 4ms)
     2017-12-11 12:40:35,991 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IDiscoverable
     2017-12-11 12:40:35,992 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IDiscoverable (took 0ms)
     2017-12-11 12:40:35,992 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving Umbraco.Web.Mvc.SurfaceController
     2017-12-11 12:40:35,996 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved Umbraco.Web.Mvc.SurfaceController (took 4ms)
     2017-12-11 12:40:35,997 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IDiscoverable
     2017-12-11 12:40:35,997 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IDiscoverable (took 0ms)
     2017-12-11 12:40:35,998 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving Umbraco.Web.WebApi.UmbracoApiController
     2017-12-11 12:40:36,003 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved Umbraco.Web.WebApi.UmbracoApiController (took 4ms)
     2017-12-11 12:40:37,464 [P12484/D2/T1] INFO  Umbraco.Core.DatabaseContext - CanConnect = True
     2017-12-11 12:40:37,742 [P12484/D2/T1] INFO  Umbraco.Web.Cache.CacheRefresherEventHandler - Initializing Umbraco internal event handlers for cache refreshing
     2017-12-11 12:40:38,672 [P12484/D2/T1] WARN  Umbraco.Core.Sync.DatabaseServerMessenger - No last synced Id found, this generally means this is a new server/install. The server will build its caches and indexes, and then adjust its last synced Id to the latest found in the database and maintain cache updates based on that Id.
     2017-12-11 12:40:38,695 [P12484/D2/T1] INFO  umbraco.content - Load Xml from file...
     2017-12-11 12:40:38,737 [P12484/D2/T1] INFO  umbraco.content - Loaded Xml from file.
     2017-12-11 12:40:38,745 [P12484/D2/T1] INFO  umbraco.content - Loading content from database...
     2017-12-11 12:40:39,455 [P12484/D2/T1] INFO  Umbraco.Web.Search.ExamineEvents - Initializing Examine and binding to business logic events
     2017-12-11 12:40:39,455 [P12484/D2/T1] INFO  Umbraco.Web.Search.ExamineEvents - Adding examine event handlers for index providers: 3
     2017-12-11 12:40:39,468 [P12484/D2/T1] INFO  Umbraco.Core.CoreBootManager - Umbraco application startup complete (took 3951ms)
     2017-12-11 12:40:39,470 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - Rebuilding index, Provider=InternalMemberIndexer, NodeId=-1
     2017-12-11 12:40:39,528 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - Start data queries - member, Provider=InternalMemberIndexer, NodeId=-1
     2017-12-11 12:40:39,611 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - End data queries - member, took 81ms, Provider=InternalMemberIndexer, NodeId=-1
     2017-12-11 12:40:39,612 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - Rebuilding index, Provider=InternalIndexer, NodeId=-1
     2017-12-11 12:40:39,622 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - Start data queries - content, Provider=InternalIndexer, NodeId=-1
     2017-12-11 12:40:39,802 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IDiscoverable
     2017-12-11 12:40:39,802 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IDiscoverable (took 0ms)
     2017-12-11 12:40:39,802 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolving Umbraco.Core.PropertyEditors.IParameterEditor
     2017-12-11 12:40:39,809 [P12484/D2/T1] INFO  Umbraco.Core.PluginManager - Resolved Umbraco.Core.PropertyEditors.IParameterEditor (took 6ms)
     2017-12-11 12:40:39,959 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - End data queries - content, took 336ms, Provider=InternalIndexer, NodeId=-1
     2017-12-11 12:40:39,959 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - Start data queries - media, Provider=InternalIndexer, NodeId=-1
     2017-12-11 12:40:40,074 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - End data queries - media, took 113ms, Provider=InternalIndexer, NodeId=-1
     2017-12-11 12:40:40,074 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - Rebuilding index, Provider=ExternalIndexer, NodeId=-1
     2017-12-11 12:40:40,086 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - Start data queries - content, Provider=ExternalIndexer, NodeId=-1
     2017-12-11 12:40:40,119 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - End data queries - content, took 31ms, Provider=ExternalIndexer, NodeId=-1
     2017-12-11 12:40:40,119 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - Start data queries - media, Provider=ExternalIndexer, NodeId=-1
     2017-12-11 12:40:40,126 [P12484/D2/T1] INFO  UmbracoExamine.DataServices.UmbracoLogService - PerformIndexAll - End data queries - media, took 6ms, Provider=ExternalIndexer, NodeId=-1
     2017-12-11 12:40:40,348 [P12484/D2/T8] INFO  Umbraco.Core.Sync.ApplicationUrlHelper - ApplicationUrl: http://localhost:13367/umbraco (UmbracoModule request)
     2017-12-11 12:40:42,887 [P12484/D2/T8] WARN  Umbraco.Web.UmbracoModule - Status code is 404 yet TrySkipIisCustomErrors is false - IIS will take over.
     2017-12-11 12:40:43,416 [P12484/D2/T15] INFO  umbraco.content - Save Xml to file...
     2017-12-11 12:40:43,426 [P12484/D2/T15] INFO  umbraco.content - Saved Xml to file.
     2017-12-11 12:40:44,641 [P12484/D2/T16] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IDiscoverable
     2017-12-11 12:40:44,641 [P12484/D2/T16] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IDiscoverable (took 0ms)
     2017-12-11 12:40:44,641 [P12484/D2/T16] INFO  Umbraco.Core.PluginManager - Resolving [Umbraco.Web.Trees.TreeAttribute]Umbraco.Web.Trees.TreeController
     2017-12-11 12:40:44,648 [P12484/D2/T16] INFO  Umbraco.Core.PluginManager - Resolved [Umbraco.Web.Trees.TreeAttribute]Umbraco.Web.Trees.TreeController (took 6ms)
     2017-12-11 12:40:44,754 [P12484/D2/T17] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IDiscoverable
     2017-12-11 12:40:44,754 [P12484/D2/T17] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IDiscoverable (took 0ms)
     2017-12-11 12:40:44,754 [P12484/D2/T17] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IAction
     2017-12-11 12:40:44,759 [P12484/D2/T17] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IAction (took 4ms)
    

    This is the ClientDenendency.config (the default that Umbraco is coming)

    <?xml version="1.0" encoding="utf-8"?>
    
    <!-- 
    For full details of the client dependency framework, visit
    https://github.com/Shandem/ClientDependency
    It manages CSS and JS file dependencies per control without having to worry about duplicates.
    It also manages the combination, compression and minification of all JS & CSS files.
    
    NOTES:
    * Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
    * A new version will invalidate both client and server cache and create new persisted files
    -->
    <clientDependency version="1" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
    
      <!-- 
        This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.
        The LoaderControlProvider is set to default, the javascriptPlaceHolderId, cssPlaceHolderId attributes are optional and default to what is listed below. If using
        this provider, then you must specify both PlaceHolder controls on your page in order to render the JS/CSS.
      -->
      <fileRegistration defaultProvider="PlaceHolderProvider">
        <providers>
          <add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core" />
          <add name="LazyLoadProvider" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core" />
          <add name="LoaderControlProvider" type="ClientDependency.Core.FileRegistration.Providers.LoaderControlProvider,
    

    ClientDependency.Core" />

    <!-- A file map provider stores references to dependency files by an id to be used in the handler URL when using the MappedId Url type -->
    <fileMapProviders>
      <add name="XmlFileMap"
           type="ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper, ClientDependency.Core"
           mapPath="~/App_Data/TEMP/ClientDependency" />
    </fileMapProviders>
    

    the port 13367 is the one that the website is present, and the config is included from the web.config also.

    Moreover, I have activated the debug=true also in web.config

    <compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.5">
    

    I have no clue why it crash, but I tested with 7.7.4 and 7.7.6 and the bug is still present. Does anyone has an idea ?

Please Sign in or register to post replies

Write your reply to:

Draft