SharePoint Online button webpart with link to document not working anymore

AlexanderDM 21 Reputation points
2020-09-01T13:48:38.187+00:00

Hi,

We have different pages that contain a default "button webpart" which has a link to a document in a library on SharePoint Online.

In a normal situation, the user clicks on the button and he is being redirected to the document.
But since today, when they click on the button, they are being redirected to the library and not to the document.

Info about the button webpart that is being used: https://support.microsoft.com/en-us/office/use-the-button-web-part-d2e37c48-11e8-45b9-8d9e-abdaa97c2a7a

Anyone has an idea why this is not working anymore?
The default view in the library is grouped on "created by", and that's also visible in the link.
When I remove the properties from this link, it works again (but it worked before and we don't want to manually change all the links).

Thanks!

21760-navigation.png

Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

Accepted answer
  1. Jerry Xu-MSFT 7,961 Reputation points
    2020-09-02T02:41:59.407+00:00

    Hi, according to your description, I assume you want the button work like this: When a user click on it, the page will be redirected to the opened file in browser.

    If that is the desired behavior, simply get the sharing link of that certain document like this, then edit the button web part to the link you get right before.

    The link in the screenshot seems to be a URL pointing to a certain view of a document library, which is actually how it works now as you mentioned. And I am not sure about the actual situation here: When I remove the properties from this link, it works again (but it worked before and we don't want to manually change all the links)
    If the option I provide above does not fit your requirements, would you like to provide a bit more information about this part and your final goal.


    If the response is helpful, please click Accept Answer and upvote it.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AlexanderDM 21 Reputation points
    2020-09-02T11:47:06.24+00:00

    Hi @Jerry Xu-MSFT

    What I mean with "remove the properties of the link", I removed all the other information in the url that is not needed to display the document.
    For example, this is the original link:
    https://tenant.sharepoint.com/sites/IntranetLibrary/Documents/Forms/AllItems1.aspx?FilterField1=Author&FilterValue1=xyz&FilterType1=User&id=/sites/IntranetLibrary/Documents/Mobiele%20policy%202020%20-%20NL.pdf&parent=/sites/IntranetLibrary/Documents
    (the xyz is the the users display name, that's why I changed it in this example).

    If I "simplify" the url and past it in the button, it works:
    https://tenant.sharepoint.com/sites/IntranetLibrary/Documents/Mobiele%20policy%202020%20-%20NL.pdf

    They get the original link by opening the document in the browser, and then copy the url (and past it in the button for the end users).
    This has always worked until yesterday.
    When the enduser now clicks on the button, the library is opened instead of the document.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.