Posts

Featured post

Sitecore 10 Installation on Docker

  Sitecore is providing support on Dockers container officially now with the new release sitecore 10. This enables organizations to switch over Dockers Container for the development and production. Documentation is now available for the Sitecore Experience Platform 10.0 release: Sitecore XP 10.0 for developers and IT pros Sitecore XP 10.0 for business users Download Sitecore Experience Platform 10.0 and related assets from the   Downloads Portal . Sitecore 10 installation: Prerequisites Software Requirements 1.       Windows 10 1809 or later 2.       Windows Server 1809 or later 3.       Docker Desktop for Windows 4.       Container deployment package from sitecore.      Hardware Requirements 1.       Sitecore recommends 32 GB of RAM on Developers machine. This can be installed on 16 GB RAM machine...

Sitecore 10 common error

  {"The Sitecore layout service returned an item not found response."} {"The Sitecore layout service returned a response in an invalid format."} These two type error occurred  when your docker instance is unhealthy. You need to restart docker container either from windows tray or through ps commands.

#Powershell script | items created/updated by user in sitecore last n number of days

  The below script helps you to get all items created/updated by you in last n number of days.   Open PowerShell ISE in sitecore and run this with admin privilege ( Your user must be administrator)   $path ="master:/sitecore/content/" $items = Get-ChildItem -Path $path -Recurse |             Where-Object { $_.__Updated -gt [datetime]::Now.AddDays( -100 ) -and $_."__Updated By" -eq " sitecore\abc " }   ForEach ($item in $items) {     Write-Host $item.ID $item.Paths.Path }   PS: -100 will give you item updated in last 100 days

DotNet | c# | This site can't be reached localhost refused to connect

Sometime we get errors on local machine like This site can't be reached localhost refused to connect   This is because of self signed certificate configuration broken for local IIS Express or  you have never configured self signed certificates on this machine ever. To fix self-signed certificate on the local machine you need to:  --> Close Visual Studio 2017 --> Delete .vs folder from the root location  (Don't worry it will be recreated) --> Run this below command in command prompt(as Administrator): cd "C:\Program Files (x86)\IIS Express" IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44342/ -UseSelfSigned --> Run VS2017 as Administrator and execute by F5 Note: https://localhost:44342/ is what is in MVC project settings under build Tab.

#Powershell | #Sitecore | Find a string phrase in the entire content tree.

 $startPath = "master:/sitecore/content/" Write-Host "Search started $(Get-Date -format 'u')"   $list = [System.Collections.ArrayList]@() $itemsToProcess = Get-ChildItem $startPath -Language * -Recurse     if($itemsToProcess -ne $null) {     $itemsToProcess | ForEach-Object {          foreach($field in $_.Fields) {             if($field.Type -eq "Single-Line Text" -or $field.Type -eq "Rich Text" -or $field.Type -eq "General Link") {                 if($field -match '//www.abc.com') {                     $info = [PSCustomObject]@{ "ID"=$_.ID     "FieldID"=$field.ID "FieldName"=$field.Name "FieldType"=$field.Type "FieldValue"=$field }                     [void]$list.Add($info)             ...

Powershell | Sitecore | Update another field value from previous field value

$rootItem = Get-Item master:/content/Item1;  // Any item starting path $ImagesourceTemplate = Get-Item "/sitecore/templates/Project/Presentation Templates/Article with Image"; // Template path Get-ChildItem $rootItem.FullPath -Recurse | Where-Object { $_.TemplateName -eq $ImagesourceTemplate.Name } | ForEach-Object {          $_.Editing.BeginEdit()         $titlefieldValue = $_.Fields["Title"].Value         $_.Fields["ShortHeadline"].Value = $titlefieldValue;         $_.Editing.EndEdit() } // This script will be updating all child items short headline field value from Title field value.

Program on deque that implements a linked list.

Program on deque that implements a linked list. #include " " #include " " #include " " struct node { int data ; struct node *link ; } ; struct dqueue { struct node *front ; struct node *rear ; } ; void initdqueue ( struct dqueue * ) ; void addqatend ( struct dqueue *, int item ) ; void addqatbeg ( struct dqueue *, int item ) ; int delqatbeg ( struct dqueue * ) ; int delqatend ( struct dqueue * ) ; void display ( struct dqueue ) ; int count ( struct dqueue ) ; void deldqueue ( struct dqueue * ) ; void main( ) { struct dqueue dq ; int i, n ; clrscr( ) ; initdqueue ( &dq ) ; addqatend ( &dq, 11 ) ; addqatbeg ( &dq, 10 ) ; addqatend ( &dq, 12 ) ; addqatbeg ( &dq, 9 ) ; addqatend ( &dq, 13 ) ; addqatbeg ( &dq, 8 ) ; addqatend ( &dq, 14 ) ; addqatbeg ( &dq, 7 ) ; display ( dq ) ; n = count ( dq ) ; printf ( "\nTotal elements: %d", n ) ; ...