Copied to clipboard

Flag this post as spam?

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


  • El Cid 8 posts 28 karma points
    Mar 14, 2012 @ 09:54
    El Cid
    0

    AddTagsToNode generates invalid SQL

    I have upgraded to yesterday to umbraco v 4.7.1.1 (Assembly version: 1.0.4393.24044) before is was running v4.7.1

    I have a a macro that adds tags that was working fine in v.4.7.1. After upgrade to 4.7.1.1 I have encountered the following problem.

    code in razor:

    umbraco.cms.businesslogic.Tags.Tag.AddTagsToNode(d.Id, data, taggroup);

    Generates sql(sql trace):

    insert into cmsTagRelationship (nodeId,tagId) select 23524, 63 from cmsTags left outer join cmsTagRelationship
    on (cmsTags.id = cmsTagRelationship.TagId and cmsTagRelatifonship.nodeId = 23524) where
    cmsTagRelationship.tagId is null and cmsTags.id = 63
    that fails on sql server with error:

    Msg 4104, Level 16, State 1, Line 2
    The multi-part identifier "cmsTagRelatifonship.nodeId" could not be bound.
    The same query fails also on a back-up of a database prior to upgrade
    Any idea what to do ?

  • El Cid 8 posts 28 karma points
    Mar 14, 2012 @ 10:07
    El Cid
    0

    Found the cause. There is error in the sql generated by the method 

    umbraco.cms.businesslogic.Tags.Tag.AddTagsToNode(d.Id, data, taggroup);

    The typo is: cmsTagRelatifonship should be cmsTagRelationship

    I don't know if there are other features impacted. 

    Does somebody can sugest me a workaround ?


     

  • El Cid 8 posts 28 karma points
    Mar 14, 2012 @ 19:05
    El Cid
    0

    The bug has been fixed but not in 4.7.1.1 but late. I solved the problem by taking the nightly build 

     2/12/2012 12:04 PM      6768157 4.7.1.480.zip

     

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies