U4-6513 - SQL for GetLogItems by nodeid incorrect comparison

Created by Graham Carr 09 Apr 2015, 15:51:40 Updated by Shannon Deminick 26 Jun 2017, 07:11:21

Instance.GetLogItems(nodeid) is actually performing an incorrect comparison in so much that it is comparing the passed in nodeid against the id field whereas it should be nodeid field, code shown below from the log.cs file in version 7.1.4

   public List<LogItem> GetLogItems(int nodeId)
    {
        if (ExternalLogger != null)
            return ExternalLogger.GetLogItems(nodeId);
        else
            return LogItem.ConvertIRecordsReader(SqlHelper.ExecuteReader(
            "select userId, NodeId, DateStamp, logHeader, logComment from umbracoLog where id = @id order by dateStamp desc",
            SqlHelper.CreateParameter("@id", nodeId)));
    }

Comments

Shannon Deminick 26 Jun 2017, 07:11:22

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.1.4

Due in version:

Sprint:

Story Points:

Cycle: