3

I've installed the Publishing Service on my Sitecore 9.0 Update-2 environment with dedicated CM und CD server.

The publishing process seems to work. So when I publish an item on my CM I can look into the web database and the published content is there.

But on my CD I am not getting the changes directly only after restarting the Application.

I've added the following files to the bin on my CD and CM

  • Sitecore.Framework.Conditions.dll
  • Sitecore.Publishing.Service.Abstractions.dll
  • Sitecore.Publishing.Service.Delivery.dll
  • Sitecore.Publishing.Service.dll

and I've added this config to /Modules/PublishingService

  • Sitecore.Publishing.Service.Delivery.config

same content on CD and CM:

    <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
        <sitecore role:require="Standalone or ContentDelivery or ContentManagement">
            <hooks>
                <hook type="Sitecore.Publishing.Service.Delivery.PublishTargetEventsHook, Sitecore.Publishing.Service.Delivery" />
            </hooks>

            <!--
        SITECORE EVENTS
        -->
            <events>
                <event name="publishingservice:searchindex:rebuild">
                    <handler type="Sitecore.Publishing.Service.Delivery.TargetSearchIndexRebuildHandler, Sitecore.Publishing.Service.Delivery" method="RebuildTargetSearchIndex">
                        <IndexNames hint="list:AddIndex">
                            <index>sitecore_web_index</index>
                        </IndexNames>
                    </handler>
                </event>

                <event name="publishingservice:cache:clear">
                    <handler type="Sitecore.Publishing.Service.Delivery.TargetDataCacheClearHandler, Sitecore.Publishing.Service.Delivery" method="ClearTargetDataCaches" />
                </event>
            </events>
        </sitecore>
    </configuration>

I don't know If I am missing some configuration.

5
  • Have you reviewed this post? mikael.com/2019/07/… It seems to align with what you are seeing.
    – jrap
    Commented Jul 25, 2019 at 17:35
  • I've read the post but doesn't help me :-/ Commented Jul 25, 2019 at 17:57
  • Which version of publishing service are you using ? Commented Jul 25, 2019 at 19:10
  • Version 3.1.3 i am using Commented Jul 25, 2019 at 19:11
  • Have you disabled the publishingservice:searchindex:rebuild event on the CD (assuming it is not responsible for indexing) as per the manual?
    – sitecorium
    Commented Jul 26, 2019 at 7:46

1 Answer 1

1

The problem was that I have some more sites then just the default website. So I need to add the following code snipped to my configs on the CD for example inside the Sitecore.Publishing.Service.Delivery.config

 <event name="publish:end:remote">
            <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
                <sites hint="list">
                    <site name="MySite1-AT">MySite1-AT</site>
                    <site name="MySite1-DE">MySite1-DE</site>
                </sites>
            </handler>
        </event>

and then also the cache was reseted on my CD

4
  • 1
    This would indicate that your cache clearing was not set up correctly before you installed the Publishing Service
    – sitecorium
    Commented Jul 29, 2019 at 13:34
  • @sitecorium what you mean with cache clearing setup? Never heared before. Commented Jul 29, 2019 at 18:14
  • I think @sitecorium means this issue existed regardless of using the Sitecore Publishing Service. Commented Apr 26, 2020 at 14:18
  • I had the same experience. It appears that the default Sitecore setup only adds "website" to the list. In a multi-site setup this was the key to configuring the separate sites for caching. Also enable the cacheHtml="true" in the main site config for each site. Commented Jan 25, 2021 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.