Giter Club home page Giter Club logo

sitecore.protobuf.browser's Introduction

Sitecore Protobuf Browser

Sitecore uses Protobuf to store the original/default contents of databases to the disk in these paths which are defined in the databases configs:

  • ./App_Data/items/core/items.core.dat
  • ./App_Data/items/master/items.master.dat
  • ./App_Data/items/web/items.web.dat
  • ./sitecore modules/items/...

Protobuf is a google based serializer: https://github.com/protocolbuffers/protobuf which is quite fast.

Usecases

Here I have created a wpf app which allows you to browse this serialized files and check their contents. It is usefull for diagnostics specially if you are using xmcloud or if you want to do sitecore upgrade and want to figure out if your seialization items has overwritten some of the original files.

Usage

You are able to do two or three way comparison. You can choose up to three files and items shown in the content tree with some indicators:

  • Green Ellipse: It means in the current tree there is a child/descendants from the file you have selected as a module.
  • Green Rectangle: It means the item is from the file you have selected as a module.
  • Orange Ellipse: It means in the current tree there is a child/descendants from the file you have selected as a custom file.
  • Orange Rectangle: It means the item is from the file you have selected as a custom file.
  • Red Highlighted items: It means the item is existing in more than one file and possible overwritten.
  • In the Location section you will see the file location of the selected item.

The fields in parentheses are added manually for information purposes (ex. Item id, item path).

Make sure you have the neccessary files: items.master.dat, items.core.dat, items.web.dat

gif

Filtering:

You can use available filters to hide the items from main or modules to have a better overview.

gif

Important note

Your setializtion files or Sitecore modules and basically secondary files are kind of sparse tree, that means they do not include the whole tree of the master/core/web database. because of that you need to always have a relevant data at hand(ex. items.master.dat) and select it with the relevant module.

Limitations:

  • There is no post processing or evaluating the inheritance chain or standard values. It simply reads what is stored in the .dat files.
  • There is no version selector (Latest version is used)
  • There is no language selector (only English version of items is shown)
  • No search capabilities in place

Project is based on .net 4.8 sdk style with xmcloud assemblies are used in project. feel free to change them to sitecore kernel and build it.

Change log

  • Context menu for field section is added to provide easier copy the values.
  • Added three way comparison
  • Added Location
  • Added Help

sitecore.protobuf.browser's People

Contributors

gaaops avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

antonytm

sitecore.protobuf.browser's Issues

Can't open files provided by Sitecore support

I got Item files from Sitecore Support.
I try to open them using Sitecore.Protobuf.Browser. First of all they don't match filenames check in this application, but that is not a big issue, I can rename the to view.

I got an exception:
image

ProtoBuf.ProtoException: 'Invalid wire-type; this usually means you have over-written a file without truncating or setting the length; see https://stackoverflow.com/q/2152978/23354'
This exception was originally thrown at this call stack:
    [External Code]
    Sitecore.ProtobufBrowser.Services.SitecoreItemProvider.GetItems(string[], string) in SitecoreItemProvider.cs
    Sitecore.ProtobufBrowser.MainWindow.FileOpenMenu_OnClick(object, System.Windows.RoutedEventArgs) in MainWindow.xaml.cs
    [External Code]

Update:
.dat file from Sitecore indeed is kind of empty. Now, I am not sure if this case should be covered.

It contains few directives and not items:

type=file
id_InstallMode=Overwrite
id_VersionMergeMode=Undefined

Filename format check looks very strict

I got an cumulative hotfix from Sitecore Support.
I want to look, what is inside. There are files named items.master.spe.dat and items.master.sxa.dat.

I try to open them. But I got an error:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.