Copied to clipboard

Flag this post as spam?

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


  • Ian Bradley 8 posts 88 karma points
    Jan 08, 2018 @ 09:57
    Ian Bradley
    0

    Error accessing Umbraco back end after installation

    I added the Newsletter Studio package to my site hosted on Umbraco Cloud (Umbraco version 7.7.7). I did this via the Developer/Packages menu.

    The installation seemed to go fine. However the next day when I logged into the site back end I say the error "Server error: Contact administrator, see log for full details. Failed to retrieve data for sections"

    Looking at the Trace Logs I am seeing the issue is related to Newsletter Studio. For example:

    Unhandled controller exception occurred System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object. at NewsletterStudio.Umbraco.SettingsTreeController.CreateRootNode(FormDataCollection queryStrings) at Umbraco.Web.Trees.TreeControllerBase.GetRootNode(FormDataCollection queryStrings) at Umbraco.Web.Trees.ApplicationTreeExtensions.

    Hope you can help me resolve this.

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Jan 08, 2018 @ 10:35
    Markus Johansson
    0

    Hi!

    I'm guessing that this error shows when you go to the Newsletter Studio-section?

    It seems like it might have something to do with the tables in the database, are you sure that the tables was created? You should see a nsNewsletter-table and some other tables starting with ns.

    Also, have a look in the config/newsletterStudio.config-file - is this file correct? Compare to this one: https://www.newsletterstudio.org/help/configure-newsletter-studio/default-newsletterstudioconfig/

    // m

  • Ian Bradley 8 posts 88 karma points
    Jan 08, 2018 @ 11:01
    Ian Bradley
    0

    Hi Markus

    Thanks for replying.

    The error shows as soon as I login to the back end. I can't navigate the Umbraco sections either as they are missing from the navigation bar.

    The database tables seem to be there: db screen shot

    I don't know how to access the config file via Umbraco Cloud to check that.

    Thanks

    Ian

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Jan 08, 2018 @ 12:57
    Markus Johansson
    0

    Hi!

    The package should work on cloud, hmm you could just look in the /config/-folder of your solution?

    Maybe there is something wrong in your "applications.config"-file or in the "Tree.config"-file... not sure but have a look in them to see if there is any duplicates?

    // m

  • Ian Bradley 8 posts 88 karma points
    Jan 08, 2018 @ 13:31
    Ian Bradley
    0

    My applications.config file looks like this:

    <?xml version="1.0" encoding="utf-8"?>
    <applications>
      <add alias="content" name="Content" icon="traycontent" sortOrder="0" />
      <add alias="media" name="Media" icon="traymedia" sortOrder="1" />
      <add alias="settings" name="Settings" icon="traysettings" sortOrder="2" />
      <add alias="developer" name="Developer" icon="traydeveloper" sortOrder="3" />
      <add alias="users" name="Users" icon="trayuser" sortOrder="4" />
      <add alias="member" name="Members" icon="traymember" sortOrder="5" />
      <add alias="forms" name="Forms" icon="icon-umb-contour" sortOrder="6" />
      <add alias="translation" name="Translation" icon="traytranslation" sortOrder="7" />
    </applications>
    

    And my trees.config like this:

    <?xml version="1.0" encoding="utf-8"?>
    <trees>
      <!--Content-->
      <add initialize="true" sortOrder="0" alias="content" application="content" title="Content" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.ContentTreeController, umbraco" />
      <add initialize="false" sortOrder="0" alias="contentRecycleBin" application="content" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.ContentRecycleBin, umbraco" />
      <!--Media-->
      <add initialize="true" sortOrder="0" alias="media" application="media" title="Media" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.MediaTreeController, umbraco" />
      <add initialize="false" sortOrder="0" alias="mediaRecycleBin" application="media" title="Recycle Bin" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.cms.presentation.Trees.MediaRecycleBin, umbraco" />
      <!--Settings-->
      <add initialize="true" sortOrder="0" alias="documentTypes" application="settings" title="Document Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.ContentTypeTreeController, umbraco" />
      <add application="settings" alias="templates" title="Templates" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.TemplatesTreeController, umbraco" initialize="true" sortOrder="1" />
      <add application="settings" alias="partialViews" title="Partial Views" silent="false" initialize="true" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.PartialViewsTreeController, umbraco" sortOrder="2" />
      <add application="settings" alias="stylesheets" title="Stylesheets" type="umbraco.loadStylesheets, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="3" />
      <add application="settings" alias="stylesheetProperty" title="Stylesheet Property" type="umbraco.loadStylesheetProperty, umbraco" iconClosed="" iconOpen="" initialize="false" sortOrder="0" />
      <add application="settings" alias="scripts" title="Scripts" type="Umbraco.Web.Trees.ScriptTreeController, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
      <add application="settings" alias="languages" title="Languages" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.LanguageTreeController, umbraco" sortOrder="5" />
      <add application="settings" alias="dictionary" title="Dictionary" type="umbraco.loadDictionary, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="6" />
      <add initialize="true" sortOrder="7" alias="mediaTypes" application="settings" title="Media Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MediaTypeTreeController, umbraco" />
      <!--Developer-->
      <add initialize="true" sortOrder="0" alias="packager" application="developer" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.PackagesTreeController, umbraco" />
      <add initialize="true" sortOrder="1" alias="dataTypes" application="developer" title="Data Types" iconClosed="icon-folder" iconOpen="icon-folder" type="Umbraco.Web.Trees.DataTypeTreeController, umbraco" />
      <add application="developer" alias="macros" title="Macros" type="umbraco.loadMacros, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="2" />
      <add application="developer" alias="relationTypes" title="Relation Types" type="umbraco.loadRelationTypes, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="4" />
      <add application="developer" alias="xslt" title="XSLT Files" type="umbraco.loadXslt, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="5" />
      <add application="developer" alias="partialViewMacros" type="Umbraco.Web.Trees.PartialViewMacrosTreeController, umbraco" silent="false" initialize="true" sortOrder="6" title="Partial View Macro Files" iconClosed="icon-folder" iconOpen="icon-folder" />
      <!--Users-->
      <add initialize="true" sortOrder="0" alias="users" application="users" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.UserTreeController, umbraco" />
      <!--Members-->
      <add initialize="true" sortOrder="0" alias="member" application="member" title="Members" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MemberTreeController, umbraco" />
      <add initialize="true" sortOrder="1" alias="memberTypes" application="member" title="Member Types" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Umbraco.Web.Trees.MemberTypeTreeController, umbraco" />
      <add application="member" sortOrder="2" alias="memberGroups" title="Member Groups" type="umbraco.loadMemberGroups, umbraco" iconClosed="icon-folder" iconOpen="icon-folder" />
      <!--Translation-->
      <add silent="false" initialize="true" sortOrder="1" alias="openTasks" application="translation" title="Tasks assigned to you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadOpenTasks, umbraco" />
      <add silent="false" initialize="true" sortOrder="2" alias="yourTasks" application="translation" title="Tasks created by you" iconClosed="icon-folder" iconOpen="icon-folder" type="umbraco.loadYourTasks, umbraco" />
      <!-- Custom -->
      <!--<add application="myApplication" alias="myTree" title="Me Tree" type="MyNamespace.myTree, MyAssembly"
           iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="10" />-->
      <add initialize="true" sortOrder="9" alias="diploTraceLog" application="developer" title="Trace Logs" iconClosed="icon-folder" iconOpen="icon-folder-open" type="Diplo.TraceLogViewer.Controllers.TraceLogTreeController, Diplo.TraceLogViewer" />
    </trees>
    

    There is no newsletterStudio.config file in my configs folder.

  • Ian Bradley 8 posts 88 karma points
    Jan 08, 2018 @ 14:00
    Ian Bradley
    0

    Sorry, forgot to wrap last comment in code tags. Config file contents should be visible now!

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Jan 08, 2018 @ 14:08
    Markus Johansson
    0

    Hi!

    If you don't have the newsletterStudio.config file in the config-folder thats probably why you get the error.

    This kinds of errors happens when the write permissions to the folders/files that Newsletter Studio needs to change during install is not correct.

    I would install it locally and push to the server, you would need to add the newsletterStudio.config-file to the /config/-folder and this section to your root web.config:

     <configSections>
    <section name="newsletterStudio" type="NewsletterStudio.Bll.Configuration.NewsletterStudioConfig, NewsletterStudio, Version=2.1.9.1, Culture=neutral, PublicKeyToken=null" allowLocation="true" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" overrideModeDefault="Allow" restartOnExternalChanges="true" requirePermission="true" />
      ....
     </configSections>
    
  • Ian Bradley 8 posts 88 karma points
    Jan 08, 2018 @ 14:23
    Ian Bradley
    0

    Thanks Markus.

    I added the config changes and it seems to be fixed.

    Many thanks

    Ian

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Jan 08, 2018 @ 14:24
    Markus Johansson
    0

    Hi!

    Nice to hear! Thanks for sharing the solution!

    Please let us know if you have any other questions, issues or feedback!

    Cheers!

    // m

  • Ian Bradley 8 posts 88 karma points
    Jan 10, 2018 @ 09:28
    Ian Bradley
    0

    Hello again Markus

    Everything seemed to be working right, but when I logged out of Umbraco and back in the Newsletter Studio icon is no longer showing in the side bar.

    I checked that none of the config files have been changed since all was working.

    No errors showing in the Trace Logs.

    Hope you can help!

    Ian

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Jan 10, 2018 @ 09:46
    Markus Johansson
    0

    Hi!

    Are you sure that the user that you are login in as has access to that section/application?

    And are you sure that the application.config file contains the newsletterStudio-section? Also same for trees.config?

    / m

  • Ian Bradley 8 posts 88 karma points
    Jan 10, 2018 @ 10:11
    Ian Bradley
    0

    It looks like it is not listed in the trees.config. Please send me an example of what needs adding. Thanks!

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Jan 10, 2018 @ 10:49
    Markus Johansson
    100

    Hi!

    The files should look something like this:

    Applications.config

    <?xml version="1.0" encoding="utf-8"?>
      <applications>
         ....
       <add alias="NewsletterStudio" name="Newsletter Studio" icon="icon-message" sortOrder="15" />
     </applications>
    

    Trees.config

    <?xml version="1.0" encoding="utf-8"?>
     <trees>
      .....
    
      <add initialize="true" sortOrder="10" alias="MailingList" application="NewsletterStudio" title="Mailing lists" iconClosed="icon-folder" iconOpen="icon-folder-open" type="NewsletterStudio.Umbraco.MailingListTreeController, NewsletterStudio" />
      <add initialize="true" sortOrder="5" alias="Newsletter" application="NewsletterStudio" title="Newsletters" iconClosed="icon-message" iconOpen="icon-message" type="NewsletterStudio.Umbraco.NewsletterTreeController, NewsletterStudio" />
      <add initialize="true" sortOrder="15" alias="Settings" application="NewsletterStudio" title="Settings" iconClosed="icon-settings" iconOpen="icon-settings" type="NewsletterStudio.Umbraco.SettingsTreeController, NewsletterStudio" />
    </trees>
    

    Hope this solves your issues, strange that they disappeared - you might need to make sure that these files don't get overwritten by some process or something.

  • Ian Bradley 8 posts 88 karma points
    Jan 10, 2018 @ 14:00
    Ian Bradley
    0

    Thanks Markus,

    Looks like this has resolved the issue.

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Jan 10, 2018 @ 14:07
    Markus Johansson
    0

    Great news!

    Thanks for letting me know.

Please Sign in or register to post replies

Write your reply to:

Draft