Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View Properties / Edit Properties links are incorrect #19

Open
xantari opened this issue Jan 28, 2019 · 2 comments
Open

View Properties / Edit Properties links are incorrect #19

xantari opened this issue Jan 28, 2019 · 2 comments

Comments

@xantari
Copy link

xantari commented Jan 28, 2019

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.

@wobba
Copy link
Contributor

wobba commented Jan 28, 2019

@xantari feel free to submit a PR fixing this.

@xantari
Copy link
Author

xantari commented Jan 28, 2019

Not sure the best way to fix this. A lot of the code in the display templates are a black box to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants