2

I'm having some trouble getting info from the pipeline for the new-ish Sitecore Publishing Service in Sitecore 8.2.

We're getting the list of ModifiedFields from PublishEndResultBatchArgs. The problem is only the revision field is being returned. We are expecting a list of what was changed. See code. Any ideas? Thanks.

public class PublishBatchResultProcessor
{
    public void Process(PublishEndResultBatchArgs args)
    {
        foreach (var result in args.Batch)
        {
            var fieldChanges = result.Metadata.FieldChanges;
            //This gives me a collection with only one item - The revision field
        }
    }
}

Patch File:

<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <publishEndResultBatch>
        <processor type="Foo.PipelineStuff.PublishBatchResultProcessor, Foo.PipelineStuff"
                   patch:before="*[@type='Sitecore.Publishing.Service.Pipelines.BulkPublishingEnd.RaiseRemoteEvents, Sitecore.Publishing.Service']" />
      </publishEndResultBatch>
    </pipelines>
  </sitecore>
</configuration>
  • did you try lastPublishedDate vs item's publish date. ? i have tried this before for getting items which were modified since last publish. – Balaji Kuppuswamy Mar 29 '17 at 4:40
  • This question applies to the Publishing Service module. Not the out of the box Sitecore publishing. – RReilley Mar 29 '17 at 15:59
6

This is by design. For performance reasons, the Publishing Service only reports field changes that are essential for features in Sitecore to function correctly.

The fields that will be reported on are:

  • Revision - {8CDC337E-A112-42FB-BBB4-4143751E123F}

  • NeverPublish - {9135200A-5626-4DD8-AB9D-D665B8C11748}

  • PublishDate - {86FE4F77-4D9A-4EC3-9ED9-263D03BD1965}

  • UnpublishDate - {7EAD6FD6-6CF1-4ACA-AC6B-B200E7BAFE88}

  • PublishingTargets - {74484BDF-7C86-463C-B49F-7B73B9AFC965}

  • HideVersion - {B8F42732-9CB8-478D-AE95-07E25345FB0F}

  • ValidFrom - {C8F93AFE-BFD4-4E8F-9C61-152559854661}

  • ValidTo - {4C346442-E859-4EFD-89B2-44AEDF467D21}

  • WorkflowState - {3E431DE1-525E-47A3-B6B0-1CCBEC3A8C98}

  • DefaultWorkflow - {CA9B9F52-4FB0-4F87-A79F-24DEA62CDA65}

  • Clones.SourceVariant - {1B86697D-60CA-4D80-83FB-7555A2E6CE1C}

  • Clones.SourceItem - {19B597D3-2EDD-4AE2-AEFE-4A94C7F10E31}

The ability to configure the Service to report on other fields will be delivered in v2.0 Update 1, due for release probably sometime in May 2017.

  • So we tried it and it does not seem to work. This is what shows up in the showconfig.aspx. Is there something else we need to look at to get the values? <Publishing patch:source="z-PublishService.config"> <Services> <RequiredPublishFieldsResolver> <Options> <AdditionalItemFieldsIds> <f1>{4712EF95-FAD6-4250-BB4E-D9094079D431}</f1> </AdditionalItemFieldsIds> </Options> </RequiredPublishFieldsResolver> </Services> </Publishing> – RReilley Mar 30 '17 at 15:40
  • @RReilley Apologies, I wasn't clear. This needs to go into the config of the Service itself, not the Sitecore module side. I will amend my answer to make this clear. – Trevor Reeves Mar 31 '17 at 11:04
  • So we've been trying this solution but not having any luck. We put in a support ticket because that lets us put up a lot more information about our environment but they seem kinda confused about the whole thing. Do you have any ideas for why this isn't working? – RReilley Apr 19 '17 at 16:12
  • @RReilley Assuming you're on V2 of Publishing, I can't say without investigating properly. One of our team will be much better placed to give you an accurate answer, I should have a chance early next week to take a look. Sorry it can't be sooner. – Trevor Reeves Apr 21 '17 at 14:31
  • Thanks @Trevor I appreciate the help. We currently have a ticket open. – RReilley Apr 21 '17 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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