Copied to clipboard

Flag this post as spam?

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


  • Mark 15 posts 86 karma points
    Mar 17, 2016 @ 18:01
    Mark
    0

    Umbraco version 7.4.1. Package export, some random error

    Hi Guys and Gyals

    Working locally I am trying to export everything I did, templates, pages, doctypes etc, scripts, css etc so I can import them into the umbraco that is on the server.

    I was following along this story here to get this done: http://www.uquickstart.com/umbraco-tips-and-tools/package-up-your-umbraco-website

    But instead I see these errors:

    Server Error in '/' Application.
    
    The legacy umbraco.cms.businesslogic.web.StyleSheet API is no longer 
    functional for retrieving stylesheets based on an integer ID. Stylesheets 
    are no longer persisted in database tables. Use the new Umbraco.Core.Services.IFileSystem APIs instead of working with Umbraco stylesheets.
    

    I disabled export if all stylesheets in the checkbox list and now when I click publish to export the package I see this:

    Server Error in '/' Application.
    
    The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
    

    any ideas of how I can resolve this?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 17, 2016 @ 19:04
    Jan Skovgaard
    0

    Hi Mark

    Not sure the approach is right for what you wan to achieve? To me it sounds like you're trying to deploy your local site to the server?

    If so I think you should consider using FTP depending on your setup and your scenario.

    So before I try to help even further I would like to know if my assumption about you trying to deploy the site is correct? :)

    Looking forward to hearing from you.

    /Jan

  • Mark 15 posts 86 karma points
    Mar 17, 2016 @ 23:32
    Mark
    0

    I have ftp set up etc.

    But I thought that could do everything locally in the cms, then export everything and import everything onto the remote server. Such as the styles created in the cms, templates, and datatypes.

    Was not sure where the settings created via the local cms would be.

    For example I know where the following files are for:
    views
    js
    css
    scripts

    But then I wondered if I was to go the ftp route, where in the file structure would be the:
    DocumentTypes,
    custom DataTypes,
    custom grids,
    settings for all the 'create styles' I created for content Editors to use in the RTE,
    etc.

    So I considered then the best route would be to export everything from the local umbraco and then import them into the umbraco on the server.

    I considered via ftp, I would loose some of the settings, I set up for content editors.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 18, 2016 @ 07:19
    Jan Skovgaard
    1

    Hi Mark

    Ok, then I'll suggest you use FTP instead as maintaining the package can easily become a nightmare and I'm not aware of anyone using this approach for updating the site so it's not a very common approach. I usually only use the packaging functionality if I have build a property editor for instance and want to make it into an easily re-usable package that I can use in my next project etc.

    You should simply just overwrite your files and folders on the server, that exists inside your website folder.

    In regards to the database if you're using MSSQL and have it setup so you can access it locally and when on the server then the changes are already on your server and all you need is to copy over the files.

    If you're using the embedded CE SQL database well then it's just a matter of copying over all of your files since this database is a file, which exists in the /App_Data folder as umbraco.sdf

    Hope this makes any sense? :)

    /Jan

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 18, 2016 @ 08:32
    David Brendel
    2

    Hi Mark,

    I also think that packaging everything up for deployment isn't the right way. Trier that once and also dropped it shortly after.

    You can also have a look at uSync to deploy/sync changes between umbraco instances.

    Regards David

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 18, 2016 @ 08:45
    Jan Skovgaard
    1

    Yes, once you're familiar with Umbraco and how to manually deploy I also think that having a look at uSync is a good idea.

    There is also Umbraco's own Courier, which is a paid package that might be of interest if you're building a larger site for a client - But for a personal project or for minor clients it's probably overkill.

    Also there is another 3rd party package called "umport", which perhaps is also useful https://our.umbraco.org/projects/developer-tools/umport/

    /Jan

  • Mark 15 posts 86 karma points
    Mar 18, 2016 @ 10:32
    Mark
    0

    Hi Jan, thank you very much, I think that worked looks good, but somethings are missing do I need to copy the file over from App_data/umbraco.config also?

    do I copy over everything from media folder?, I guess I do.

    one thing though, in my new installation of umbraco:~ I have the original site that comes with umbraco:
    ---Content
    ----Home
    -------Learn
    -------Explore
    -------Extend
    -------Blog
    -------Contact

    And below that I have another site I created so I can test things as I am learning:
    ----Home - site 2
    -------About
    -------Study
    -------Contact Us

    So the entire structure in Content is like:
    ---Content
    ----Home
    -------Learn
    -------Explore
    -------Extend
    -------Blog
    -------Contact


    ----Home - site 2
    -------About
    -------Study
    -------Contact Us

    Everything is published for 'Home - site 2', when i go the the home page of the site: www.domain.com

    I see these errors on the home page, am I missing something:

    Server Error in '/' Application.
    <!-- Web.Config Configuration File -->
    
    <configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
    </configuration>
    
    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
    
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
    </configuration>
    

    I am just trying to get through these teething pains, thank you All so much for your help by the way...

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 18, 2016 @ 18:20
    Jan Skovgaard
    1

    Hi Mark

    No the umbraco.config will be generated automatically on the server so no need to copy it over.

    Yes you'll need to copy over the media from local to live - But if you upload media to live and need to have them locally as well you will also need to copy the media from your live site to the local site.

    Ok so to figure out what the error is you should go to the "customErrors" setting in the web.config on your live site and set it to "Off" like it says on the error screen. For security purpose this is usually set to "RemoteOnly" by default so remember to set it back once you have seen what the error is - But since you have access to the server and thereby are able to look at the log files you can just do that instead - So go to the /App_Data/Logs file and see what the error message says. It should be marked with "ERROR".

    It's been a while since I put a site on a server with two home nodes without specifically setting up a domain on each home node so can't quite remember what it is Umbraco does out of the box without some settings being modified...but you should be able to access both sites but if a page on the first site has the same name as a page on the second site the page from the first site will be hit by default if I remember correctly.

    But let's see what the error says before taking further steps :) - Btw a nice package for accessing the logs inside the "Developer" section of Umbraco is the Diplo Log Viewer that is probably a good idea to install since it saves you the trouble of manually going to the log on the disk - You can learn more about the package here https://our.umbraco.org/projects/developer-tools/diplo-trace-log-viewer/

    /Jan

  • Mark 15 posts 86 karma points
    Mar 18, 2016 @ 21:13
    Mark
    0

    Changed customeErrors to "Off" the page now shows error with:

    The "RenderBody" method has not been called for layout page "~/Views/Master.cshtml".
    



    logs show:

    Log entries removed by admin

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 19, 2016 @ 07:44
    Jan Skovgaard
    1

    Hi Mark

    I have taken the liberty to remove the log entries since it was quite long and only contained messages marked with "INFO" - No "WARN" messages existed and that was what we were interested in figuring out if there were any.

    The error you see after changing the custom errors makes me wonder if you have copied over the /views folder from your local environment to your server? Does @RenderBody() exist somewhere inside your Master.cshtml file?

    /Jan

  • Mark 15 posts 86 karma points
    Mar 19, 2016 @ 18:59
    Mark
    0

    All the View files are there, Master page has :

    <nav>
              @{ Html.RenderPartial("MainNavigation2"); }
            </nav>
    

    and

    @CurrentPage.GetGridHtml("BasicGridLayout");
    
    
            @* // how to comment out code
                @RenderBody() 
            *@
    

    I omitted render body because, I am using grids. But in any case if remove CurrentPage.GetGrideHtml ... and enable @RenderBody()

    when I do preview from the master page or any of its child pages, the preview pages just shows:

    The file "~/Views/Master.cshtml" cannot be requested directly because it calls the "RenderBody" method.
    

    But you know what, here is the magic, I deleted the other site home:
    --Content
    ----Home
    -------Learn
    -------Explore
    -------Extend
    -------Blog
    -------Contact

    and now I just have the following:
    --Content
    ----Home - site 2
    -------About
    -------Study
    -------Contact Us

    And you know what, now it works, when I go to www.domain.com, I now see the site without errors. Perhaps that could have been the cause of the umbraco export package errors :0

    Looks like umbraco gets confused when you have more then one site. That is a pitty. Perhaps then instead of deleting the other one, I should have set all the individual pages under the other one to unpublish.

    I think Umbraco needs another option on the menu under the master pages level to unpublish an entire site. It would be painfully tedious to unpublish lots of individual pages.

    I would be interested, though to know how to develop multiple sites in one instance, and then just enable individual sites to show up on the domain www.domain.com?

    This would be a very useful feature, especially as a then you can do presentations to show site versions to potential clients (if I had any- just an idea), or just to show different responsive components in different sites.

    If this was possible to like have multiple sites in one instance of umbraco without trouble, I could build a really incredible front end components that could function across multiple sites :)

  • Mark 15 posts 86 karma points
    Mar 19, 2016 @ 19:36
    Mark
    0

    Thank you guys, all of your for all your help and ideas about other plugins etc.

    Nice work, much appreciated, Thanks.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 23, 2016 @ 09:44
    Jan Skovgaard
    0

    Hi Mark

    Sorry about the late reply - I missed the email notification about your latest replies somehow.

    Did you manage to progress on this or are you still stuck?

    Umbraco is able to handle multiple sites...however it's a bit tough to guide you without knowing your setup etc. - Sometimes one can write a 1000 words in order to trying to help without the message being clear etc. for something that can be fixed with just a simple click and tweaking some settings.

    So I'm wondering if you can post a screendump of the content section showing the structure - I can imagine what it looks like from the outline you have posted above but it would still be nice to see. And I would also like to see your "Culture and hostnames" settings on your "home" node for both sites.

    You should be able to attach images by hitting the image icon in the editor toolbar for the forum.

    Looking forward to hearing from you.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft