Copied to clipboard

Flag this post as spam?

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


  • David Conlisk 432 posts 1008 karma points
    Apr 23, 2015 @ 11:54
    David Conlisk
    0

    GetContentOfContentType fails for certain document type

    Hi all,

    I am working on Umbraco v7.2.4. I have a surface controller that has an action that loops over all documents of a certain type and does stuff (generate a text file).

    Here is my code in its most simple form:

    public class DataImportController : SurfaceController
    {
    
        public string Test()
        {
            var cs = new ContentService();
            var allItems = cs.GetContentOfContentType(1145);
            return "ok";
        }
    }
    

    This runs fine on my local site and on the staging server for any document type. But on the live server, it always causes a Service Unavailable message (but doesn't take the whole site down) for a particular document type (news article).

    I'm at a loss as to how to proceed. Is this a data issue, and if so, how can I find out which node is causing the problem?

    Any ideas to try?

    Thanks,

    David

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Apr 23, 2015 @ 11:56
    Jeroen Breuer
    0

    Hello,

    I've had some strange things like this too. Maybe repulishing the entire site on the live server helps.

    Jeroen

  • David Conlisk 432 posts 1008 karma points
    Apr 23, 2015 @ 12:38
    David Conlisk
    0

    Thanks Jeroen,

    I have tried republishing the particular area of the site (news area) but I'll try the whole site too. Good to know I'm not the only one to have seen this!

    Cheers,

    David

  • David Conlisk 432 posts 1008 karma points
    Apr 24, 2015 @ 15:06
    David Conlisk
    0

    Hi all,

    Just for the sake of completion, in the end I had to download the database from the live server and run my data imports, etc, locally, and the push the db back to the server. I never got to the bottom of the issue. I was also getting Service Unavailable messages from CMSImport on the live server - again got around this by doing what I needed to do locally.

    Cheers,

    David

Please Sign in or register to post replies

Write your reply to:

Draft