When using custom buttons in partner community and Salesforce internal, you need to modify button code to include “{!URLFOR($Site.Prefix+’/” at the beginning of the button code that is showing at bottom of document action.

For example, the full button code could look like:
{!URLFOR($Site.Prefix+’/apex/rsdoc__GenerateDocument?id=’+Opportunity.Id+’&templateId=GDT-000005&attach=true&download=true&output=pdf&saveInField=Proposal_Link__c&signatureAction=Preview&counterSignMethod=Auto
Counter
Sign&counterSignedBy=’+Opportunity.OwnerId+’&esignparam1=Opportunity&esignparamvalue1=’+Opportunity.Id+’&esignparam2=&esignparamvalue2=&emailTo=’+Opportunity.Primary_ContactId__c+’&emailTemplate=00X0G000001buAh&emailToAdditional=&emailCC=&emailBCC=&fieldtoupdate1=Proposal_Status__c&fieldtoupdatevalue1=Generated’)}

This button format needs to be used in
communities and salesforce internal to avoid error message. Salesforce article showing this is common issue with these types of org’s:
https://developer.salesforce.com/forums/?id=906F000000099IfIAI