Skip to content

View Properties / Edit Properties links are incorrect #19

@xantari

Description

@xantari

When you hover over the View Properties / Edit Properties links in the CSWP or the Search Result WP using these templates: https://github.com/SPCSR/DisplayTemplates/blob/master/Search%20Display%20Templates/Table%20Layout%20with%20Sorting%20Templates%20(CSWP)/SearchResultsWP/Item_List_Item.html

The links are incorrect.

The problem appears to be this line:

var viewPropUrl = String.format('/_layouts/15/listform.aspx?ListId={0}&ID={1}&ContentTypeID={2}&Source={3}', listID, listItemID, ContentTypeId, window.location.href.split('#')[0]);

It assumes all documents are in the same site as the Search site collection, which is not true in most cases. So the links do not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions