Sitecore stores Links database/table to Core db in On-Premise environment, but in a scaled environment, it stores Links table to Web database. By default, "Publishing Service" points to Core database so you need to change this setting to Web.
File: In sitecore publishing webApp: sitecorepublishing\config\sitecore\publishing\sc.publishing.xml
<DefaultConnectionFactory> <Options> <Connections> <Links> <Type>Sitecore.Framework.Publishing.Data.AdoNet.SqlDatabaseConnection, Sitecore.Framework.Publishing.Data</Type> <LifeTime>Transient</LifeTime> <Options> <ConnectionString>${Sitecore:Publishing:ConnectionStrings:Web}</ConnectionString> <DefaultCommandTimeout>120</DefaultCommandTimeout> <Behaviours> <backend>sql-backend-default</backend> <api>sql-api-default</api> </Behaviours> </Options> </Links>
You can refer Sitecore.Config file to verify your CM configuration.
<sc.variable name="defaultLinkDatabaseConnectionStringName" value="core" /> <sc.variable name="defaultLinkDatabaseConnectionStringName" role:require="ContentDelivery or ContentManagement"> <patch:attribute name="value">web</patch:attribute> </sc.variable>
<LinkDatabase type="Sitecore.Data.$(database).$(database)LinkDatabase, Sitecore.Kernel"> <param connectionStringName="$(defaultLinkDatabaseConnectionStringName)" />
Finally enable file "sc.publishing.relateditems.xml" at sitecorepublishing\config\sitecore\publishing
Note 1: You might face issue with schema after making above changes, so in order to resolve that issue you need to re-run update schema command again, irrespective of previous schema state,
Command 1:.\Sitecore.Framework.Publishing.Host.exe schema list
Command 2:.\Sitecore.Framework.Publishing.Host.exe schema upgrade --force
Note 2: Authors must select the Publish Related items checkbox before publishing.
Note 3: Sitecore only publishes those related items, which are referenced by the selected item, but not those, which refer to that selected item.
sitecorepublishing\config\sitecore\publishing?