Skip to main content

Posts

GraphQL for Sitecore: A beginner walkthrough

If you are a beginner in GraphQL and you are looking step-by-step by process to setup GraphQL API on Sitecore, please proceed further and setup up GraphQL API for Sitecore Before we jump start Sitecore GraphQL API, let us start some basic introduction of GraphQL. What is GraphQL GraphQL is a query language GraphQL provides a complete and understandable description of the data in your API It gives the power to ask exactly what you need and nothing more Designed to support the needs of the front-end Strongly typed, self-documenting Bandwidth efficient Easy real-time data Sitecore GraphQL API The Sitecore GraphQL API is a generic GraphQL service platform on top of Sitecore. It hosts your data and presents it through GraphQL queries. The API supports real-time data using GraphQL subscriptions Get GraphQL by installing the JSS server components package Sitecore GraphQL does not have any GraphQL endpoints defined by default Define at least one endpoint to use the GraphQL...

How to manage the Updates, Hotfixes and Install them using Update Center

In the later versions of Sitecore i.e. 9.0 Update 2 and onwards, Sitecore has introduced a tool called Update Center which is used to manage the following tasks on Sitecore platform and Sitecore modules. Find the newer version Find the updates on the existing version Find the hotfixes if there are any Listing them on the Update Center dashboard Download and Install them The Update Center can download and install the updates from a package in the file system using the Package Management Service . You can find the Update Center tool on the Sitecore Launchpad. Update Center listed under Control Panel category Click and open the Update Center and you will see all the available updates for the Sitecore Platform and modules under the respective category if there are any. For me, under Sitecore platform updates, it is listing Sitecore platform 9.2.0 as the update available as my current version is Sitecore 9.1.1. On the above picture, on the left pane, the Updates opt...

Copy field value from Web database to Master database using Powershell

Recently, we encountered an instance where we need to copy a particular field value from Sitecore Web database to Master database in a peculiar case.    I wrote a simple PowerShell script which did the trick. Here is the script and the same can be modified on the case to case basis. Here are the steps.  1.Filter and select the Sitecore items based on a template id for particular type of items from both master database and web database. 2. Loop through the list and find a matching item based on the item id from Master DB and Web DB. 3. Edit the match which common in both the database. $pagetempId='{349F8A57-BA39-42DD-A82F-671641D05812}' $path="/sitecore/content/MySite/Press/News" $itemsmaster=Get-ChildItem master:$path -recurse | where-object { $_.'TemplateId' -eq $pagetempId} $itemsweb=Get-ChildItem web:$path -recurse | where-object { $_.'TemplateId' -eq $pagetempId} foreach($itemweb in $itemsweb) {   foreach($itemmaster in $itemsm...

How to retrieve WFFM form data when Save Form Data to Storage is unchecked

Recently, we had situation where for one of our WFFM form (Contact Us form) Save Form Data To Storage was unchecked by mistake and published unknowingly by one of our content admin. This we noticed after few days. Between this period, data stopped storing into reporting database and reports were not showing data for the latest submissions in WFFM form reports. Regarding the same, just wanted to document our options and approaches which we thought and recovered the data for this period. In Sitecore 8.1, it is possible to configure WFFM data storage in different ways (using SQL or Mongo providers). It is also possible to collect WFFM data with analytics disabled. Querying Mongo DB : Since the "Save Form Data To Storage" field has been unchecked, the data was not saved to reporting DB. However, it can still be found in analytics MongoDB, in the "interactions" section. Unfortunately, writing these values to reporting table is a very nontrivial task and it w...

Experience editor not working for Sitecore with SXA.

Experience editor not working for Sitecore with SXA 1.4. It just shows "An error occurred" whenever we open a page in Experience editor. Probable Reason:  While investigating this issue on SXA, found that SXA replaces the Sitecore’s default processor  Sitecore.Pipelines.RenderField.RenderWebEditing  with  Sitecore.XA.Foundation.Editing.Pipelines.RenderField.RenderWebEditing  which is causing the issue and making the content not editable in Experience Editor.  Solution:  This is working after disabling the processor <processor patch:instead="*[@type='Sitecore.Pipelines.RenderField.RenderWebEditing, Sitecore.Kernel']" type="Sitecore.XA.Foundation.Editing.Pipelines.RenderField.RenderWebEditing, Sitecore.XA.Foundation.Editing"/>  in Sitecore.XA.Foundation.Editing.config file. Found that experience editor is working for both normal sitecore page as well as SXA page. But sitecore also provided a hot fix for this issue in the suppor...