Copied to clipboard

Flag this post as spam?

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


  • Nonacc 63 posts 184 karma points
    Apr 02, 2014 @ 14:02
    Nonacc
    0

    Went wrong in a moment - "Invalid column name".

    Hi community,

    This morning we encountered a very strange issue, our site just stopped working.

    The error we get is - Invalid column name 'alias'.

    I can access the backoffice but the content tree is not loaded, same error.

    Umbraco v6.1.6 (Assembly version: 1.0.5021.24867)

    You can see live example here -> Live Website

    What should i do? Any ideas?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 02, 2014 @ 14:04
    Jan Skovgaard
    0

    Hi Nonacc

    What is your setup like? Has there been issues with your database server? Has anything been written to the logs?

    Is the webserver running out of disk space?

    /Jan

  • Nonacc 63 posts 184 karma points
    Apr 02, 2014 @ 14:14
    Nonacc
    0

    Hey Jan,

    The site worked fine for first few months, it happened suddenly.

    There were no problems with the database and nothing was written to the log, it's very strange.

    The site uses 20% of the disk place, there is enough space.

    What else could it be?
     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 02, 2014 @ 14:16
    Jan Skovgaard
    0

    Hi Nonacc

    Ok, that's pretty weird.

    But somewhere in the setup something must have changed or gone wrong. Are there any 3rd part packages being used? Any custom API integration / services running?

    Was there any software updates on either the webserver or mssql server?

    /Jan

  • Nonacc 63 posts 184 karma points
    Apr 02, 2014 @ 14:27
    Nonacc
    0

    Hey Jan, thanks for the quick replies,

    I'm using the next packages:

    • uComponents v5.4.1
    • Fonqi.Colorpicker v1
    • Digibiz Advanced Media Picker v2.5
    • FamFamFam Icon Package v1
    • Document Type Dashboard v1.0
    • Document Type Fieldsets v0.5.1
    • 301 URL Tracker v1.5.2 
    There was no software updates.
  • Nonacc 63 posts 184 karma points
    Apr 02, 2014 @ 14:49
    Nonacc
    0

    I think I found something interesting, website db weighs 100 MB, it's not too much?

    Table [cmsPreviewXml] contains 4964 records, can I delete them? Or is it something important?

    There are a few tables:

    [cmsDocument] = 5001 records

    [cmsContentVersion] = 5152 records

    [cmsPropertyData] = 59578 records

    It's a small website, is it possible?

  • Glenn 28 posts 101 karma points
    Jan 28, 2016 @ 05:24
    Glenn
    100

    Well, I came across the same issue.

    System.Data.SqlClient.SqlException: Invalid column name 'allowedId'.

    It seems the following select statement has a lowercase reference to the column name allowedId.

    AllowedTypes.allowedId as ctaAllowedId
    

    Should be...

    AllowedTypes.AllowedId as ctaAllowedId
    

    Here is the original select query.

    exec sp_executesql N'SELECT cmsDocumentType.IsDefault as dtIsDefault, cmsDocumentType.templateNodeId as dtTemplateId,
                                cmsContentType.pk as ctPk, cmsContentType.alias as ctAlias, cmsContentType.allowAtRoot as ctAllowAtRoot, cmsContentType.description as ctDesc,
                                cmsContentType.icon as ctIcon, cmsContentType.isContainer as ctIsContainer, cmsContentType.nodeId as ctId, cmsContentType.thumbnail as ctThumb,
                                AllowedTypes.allowedId as ctaAllowedId, AllowedTypes.SortOrder as ctaSortOrder, AllowedTypes.alias as ctaAlias,                             
                                ParentTypes.parentContentTypeId as chtParentId,ParentTypes.parentContentTypeKey as chtParentKey,
                                umbracoNode.createDate as nCreateDate, umbracoNode.[level] as nLevel, umbracoNode.nodeObjectType as nObjectType, umbracoNode.nodeUser as nUser,
                                umbracoNode.parentID as nParentId, umbracoNode.[path] as nPath, umbracoNode.sortOrder as nSortOrder, umbracoNode.[text] as nName, umbracoNode.trashed as nTrashed,
                                umbracoNode.uniqueID as nUniqueId,                                
                                Template.alias as tAlias, Template.nodeId as tId,Template.text as tText
                        FROM cmsContentType
                        INNER JOIN umbracoNode
                        ON cmsContentType.nodeId = umbracoNode.id
                        LEFT JOIN cmsDocumentType
                        ON cmsDocumentType.contentTypeNodeId = cmsContentType.nodeId
                        LEFT JOIN (
                            SELECT cmsContentTypeAllowedContentType.Id, cmsContentTypeAllowedContentType.AllowedId, cmsContentType.alias, cmsContentTypeAllowedContentType.SortOrder 
                            FROM cmsContentTypeAllowedContentType   
                            INNER JOIN cmsContentType
                            ON cmsContentTypeAllowedContentType.AllowedId = cmsContentType.nodeId
                        ) AllowedTypes
                        ON AllowedTypes.Id = cmsContentType.nodeId
                        LEFT JOIN (
                            SELECT * FROM cmsTemplate
                            INNER JOIN umbracoNode
                            ON cmsTemplate.nodeId = umbracoNode.id
                        ) as Template
                        ON Template.nodeId = cmsDocumentType.templateNodeId
                        LEFT JOIN (
                            SELECT cmsContentType2ContentType.parentContentTypeId, umbracoNode.uniqueID AS parentContentTypeKey, cmsContentType2ContentType.childContentTypeId
                            FROM cmsContentType2ContentType 
                            INNER JOIN umbracoNode
                            ON cmsContentType2ContentType.parentContentTypeId = umbracoNode.[id]
                        ) ParentTypes 
                        ON ParentTypes.childContentTypeId = cmsContentType.nodeId   
                        WHERE (umbracoNode.nodeObjectType = @0) AND (umbracoNode.id IN (@1))',N'@0 nvarchar(40),@1 int',@0=N'a2cb7800-f571-4787-9638-bc48539a0efb',@1=1084
    

    To fix, well..

    This page contains the error so the guys at Umbraco will need to fix.

    https://github.com/umbraco/Umbraco-CMS/blob/49fc068b382874fb93b447c3ea54cdee1c90d8ae/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs

    I put in a push request to have it fixed. The issue came about when I migrated the db from a SQL CE case insensitive db to a case sensitive one. For now, I am just going to create a case insensitive one for the migration while we wait for that fix to be included in a later version.

    https://github.com/umbraco/Umbraco-CMS/pull/1068

Please Sign in or register to post replies

Write your reply to:

Draft