3

I have workflow enabled on Sitecore.

When I edit any item and send it to a reviewer, the reviewer is not able to see the shared fields in the compare tab, so any changes made in a shared field, cannot be reviewed.

Is there any way to make the shared fields visible in the compare tab?

  • Seems that is not a question. You can address your suggestion into Sitecore support and discuss your vision on an official Sitecore slack chat. – Vadzim Papko Jun 11 at 7:10
1

Sitecore Workbox uses Diff dialog to compare versions of an item. Save dialog is used in Translate mode in Content Editor. That's why it only shows Versioned fields.

I totally agree that it should include Shared fields as well, but I don't see any easy way to achieve that.

DiffForm class which is used by Diff view calls Compare method which either runs OneColumnDiffView.Compare() or TwoCoumnsDiffView.Compare() (depending on the user registry setting).

They both inherit from DiffView abstract class which has protected virtual bool ShowField(Field field) method, which in the default implementation returns false for Shared fields.

So the only solution that I can think of is:

  • create new classes inheriting from both TwoCoumnsDiffView and OneColumnDiffView and override ShowField method to make sure that Shared fields are shown.
  • create new custom DiffForm class inheriting from the original DiffForm class, decompile the original class and copy the whole code of OnLoad, OnPreRender and Refresh methods + the Compare method with a single change - use your custom TwoCoumnsDiffView and OneColumnDiffView classes there instead of the original classes.
  • edit sitecore\shell\Applications\Dialogs\Diff.xml file and set CodeBeside property to your custom DiffForm.

It will work but it will be hard to maintain while upgrading to newer Sitecore versions. You will have to double check if everything works.

Is it worth it? That's your (or your client decision).

You may also raise a Sitecore Support decision and explain that the workbox diff view doesn't show Shared fields which are changed between the versions and ask them to provide you a patch for the issue. But the only thing they can do is the same what I wrote above.

  • Thanks @Marek. I will raise a support ticket for this with Sitecore. I thought there is some issue in our installation that we are not able to see shared fields. – Mohd Kashif Jun 11 at 13:59

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.