Questions tagged [sitecore-api]

For questions related to Sitecore's API, covering questions about how to access, create, update or or delete data, as well as questions about how the Sitecore code-base is or can be used for custom or native logic, etc.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

ERROR Could not run the 'getMediaStream' pipeline for '/sitecore/media library/imagepath'. Original media data will be used

We have installed Sitecore instance in Azure , we are getting (ERROR Could not run the 'getMediaStream' pipeline for '/sitecore/media library/imagename'. Original media data will be used) this error ...
  • 49
0 votes
0 answers
27 views

Could not find configuration node: databases/database[@id='master'] [closed]

I'm new to Sitecore. Currently, I'm trying to update a Template but I get errors when accessing the database using each of these methods. 1. Sitecore.Data.Database master = Sitecore.Context.Database; ...
  • 1
2 votes
2 answers
50 views

Sitecore DropTree Query

I am using Sitecore 9. I am having a problem trying to populate the droptree in the template(source). The template ID for the Apple, Banana and Peach is {AB86861A-6030-46C5-B394-E8F99E8B87DB} and the ...
  • 55
1 vote
1 answer
52 views

How to get all the published items without publish:itemProcessed event

We have installed sitecore publishing service module to separate publishing. Earlier we were using publish:itemProcessedevent to get all publishing items but with Sitecore Publish module this event is ...
  • 49
3 votes
2 answers
67 views

Need Rest API in Sitecore which can create, get, update , delete and publish items in sitecore without writing any code

Is there any Rest API in Sitecore which can create, get, update , delete and publish items in web instance and Solr without writing any code
0 votes
0 answers
30 views

Unable to access Sitecore Publish service get request

We have a custom dashboard for monitoring all servers health check, as part that we have one component to display publishing statistics (Here we display ongoing, queued publish items). Now we are ...
  • 49
0 votes
2 answers
46 views

How to terminate/Kill Sitecore publishing using Sitecore publishing module

We have installed Sitecore publishing module (3.1.1) for Sitecore 9.0.1 version, we have multiple content authors and they are publishing multiple items simultaneously because of this few of the ...
  • 49
1 vote
1 answer
59 views

Cd url is going to 404

I have downloaded Sitecore Next JS containers setup and installed XP1 in our local instance. But the default CD url is going to 404. The CM Sitecore url including Experience Editor & Preview and ...
0 votes
2 answers
82 views

How to do Sitecore SSO integration with Azure AD?

We have to do the Sitecore SSO integration with Azure AD and need to skip the login page. Is there any document to verify the steps?
  • 153
0 votes
3 answers
43 views

Sitecore MultilistField.Remove() is not able to remove items from selected list

My Code is something like this MultilistField multilistField= item.Fields["FieldID"]; foreach (var item in multilistField.GetItems()) { if (multilistField.Contains(item.ID....
0 votes
0 answers
40 views

Sitecore Forms IViewModel and InputViewModel bool error

I am trying to get the value from the Sitecore forms in Sitecore(9.3). Actually, I am trying to hook up the Mailchimp with the Sitecore forms, following the URL. https://sitecoreguys.blogspot.com/...
  • 55
0 votes
2 answers
76 views

How to map child items using glass mapper 5.8?

I want to map child items which come from a parent datasource and I gave the parent datasource as the datasource for the rendering. This is my Datasource in my rendering This is my list of child ...
0 votes
2 answers
71 views

Sitecore 10.2 upgrade - Some sitecore folders are not displaying

We are doing Sitecore upgrade from 9.2 to 10.2. When we reusing the same new publishing targets in upgrade, we couldn't able to see the Layout/Templates/System folders. We can see that, if we can ...
  • 153
0 votes
0 answers
35 views

Sitecore forms showing form page after submission instead of thank you message

Sitecore forms showing form page after submission instead of thank you message. But thank you message showing for few seconds and vanish quickly.
  • 153
0 votes
1 answer
33 views

Sitecore Forms script are not loading intermittenly

We have Sitecore forms added in one of page and we have referenced the RenderFormsScript method. Intermittently script are not loaded in to our pages. Is there way to find the root cause?
  • 153
0 votes
1 answer
36 views

How to use OData API key with custom integrated API .NET 4.8 MVC controller?

https://doc.sitecore.com/xp/en/developers/91/sitecore-experience-manager/api-keys-for-the-odata-item-service.html https://www.linkedin.com/pulse/sitecore-api-key-throttle-series-2-md-arifuzzaman-arif/ ...
0 votes
0 answers
24 views

Searching for events of custom model type in XConnect

I have cloned this repo and updated it to run with Sitecore 10.1 (which is our current version): https://github.com/adeneys/cortex-processing-demo The above application has functionality to create a ...
2 votes
1 answer
57 views

How to get the closest items in the Sitecore tree?

I would like get the closest list of items, if the items starts with particular name in the sitecore tree. In the tree, if i am in Item page, i have to take all the closest items start with Item ...
  • 153
0 votes
1 answer
45 views

Solr returns 500 exception for /solr/sitecore_master_index/update

We have deployed Sitecore into Azure. In Solr server we noticed a 500 exception(/solr/sitecore_master_index/update). Sitecore log shows the below exception: Exception: SolrNet.Exceptions....
  • 49
0 votes
0 answers
38 views

While rebuilding sitecore index getting java.nio.file.NoSuchFileException

We have deployed Sitecore instance in Azure.When we try to rebuild master index getting below exception. We are using Sitecore 9.0.1 version. java.nio.file.NoSuchFileException: D:\home\site\wwwroot\...
  • 49
0 votes
1 answer
109 views

Unable to complete sitecore_master_index rebuild

When we try to do complete master index rebuild it gives the below error. Job started: Index_Update_IndexName=sitecore_master_index|#Exception: System.Reflection.TargetInvocationException: Exception ...
  • 49
0 votes
1 answer
56 views

When this URL(/sitecore/shell/Applications/Buckets/Services/Search.ashx) gets called

We have deployed Sitecore into the Azure cloud. We often see Sitecore CM instance getting down, to fix this slowness check the http5xxx error on the azure web APP. As part of troubleshooting noticed ...
  • 49
0 votes
0 answers
43 views

How can I use Commerce API in order to add data to the Shared Environments database?

I made a Sitecore API and registered a Router, and after that, I called it through PostmanAPI. I write a command process to add data to the database but follow the default when inheriting from ...
0 votes
1 answer
200 views

Create API controller in sitecore

I am using Sitecore 10 and trying to implement an API controller, but I got this issue when calling API in postman https://{mydomain}/saveform { "Message": "An error has occurred.&...
0 votes
0 answers
26 views

Sitecore Send an email with link to set password for a new virtual user

I'm using Sitecore 10.2 I'm currently creating a new virtual user. However I wanted to generate a link that is valid for a day and mail this link to the newly created virtual user. The virtual user ...
0 votes
0 answers
9 views

"Components does not exist" when creating custom entities on Sitecore XC 10.1

I created a custom entity following this guide: https://websterian.com/2018/10/10/sitecore-commerce-adding-an-entirely-new-entity-part-1-commerce-engine-and-business-tools/ I got an error when I ...
0 votes
0 answers
54 views

ERROR Forbidden when call API /api/GenericSearch from Postman Sitecore XC 10.1

After I deploy Sitecore.Commerce.Engine.SDK.7.0.55, I use postman and call to API /GenericSearch() follow this doc: https://doc.sitecore.com/xp/en/developers/101/sitecore-experience-commerce/search-...
0 votes
0 answers
51 views

Error 404 when calling Custom Plugin API from Sitecore 10.1 SDK

I use the Sitecore.Commerce.Engine.SDK.7.0.55 solution to create a new custom plugin from the template Sitecore.Commerce.Plugin.Sample (I left the default, not customized). Then I build and add ...
1 vote
2 answers
154 views

Show Items in drop tree dynamically based on Sites

I have a requirement to show the datasource item in droptree field and its a multi site solution. My content tree structure is as below WebSite A Home Global ...
0 votes
1 answer
107 views

How can I Override Sitecore’s Media Handler to force user to redirect to login Page if user is not Authenticated

I need a way to prevent access to files in media items if a user is not authenticated. If a user is not authenticated he/she should be forced to redirect to login Page. If a user is authenticated then ...
  • 97
1 vote
2 answers
131 views

Reset Sitecore 10.2 control editor and inetpub folder in the root directory

I have installed Sitecore 10.2 using SIA and I need to reset the control editor (so that all the templates and sites created get deleted) and the inetpub folder gets cleared up as well. Is there a way ...
  • 45
0 votes
1 answer
60 views

I was unable to setup my Sitecore 10.2 Angular app using latest NPM version 8.6.0 Node 17.8.0

While setting up my first headless Sitecore 10.2 angular app, I was getting errors like unable to resolve dependency tree Sitecore version 10.2 NPM version 8.6.0 Node 17.8.0 Command that is failing: ...
0 votes
1 answer
74 views

200 error on a bad URL request

Well this is weird, we have a Sitecore 9.1 multisite, and when someone tries to access https://www.abc.com/www.cc.com/ it is redirecting to 200 status code but with a server error message but if I ...
0 votes
4 answers
203 views

Sitecore LINQ Case-Sensitive Query

This is my code for searching a data in the specified index: using (var context = ContentSearchManager.GetIndex(Common.Constants.IndexNames.PlotTreeIndexName).CreateSearchContext()) { ...
1 vote
2 answers
68 views

Get all items in Archive and Recycle Bin

The code I know for getting the archive is Sitecore.Context.Database.Archives["archive"]. I checked the method and it has GetEntries() but it needs to be supplied with ItemID. Is it possible ...
0 votes
2 answers
153 views

Is there a way to access Azure keyvault secrets from sitecore site

I have some secrets stored in azure keyvault. Using the following code, I was able to get the secret values via a console application. using System.Management.Automation; Collection<PSObject> ...
  • 327
0 votes
1 answer
176 views

How to read values from ConnectionString config file

I want to get values from ConnectionStrings.config. Currently, I hard-coded the string in my code which I copied in ConnectionStrings.config. Is there a way via Sitecore API to fetch values from this ...
0 votes
1 answer
40 views

Get ArchiveEntry fields through the Item API

Is it possible to retrieve the fields of an ArchiveEntry type using Sitecore Item API? e.g. archiveEntry.Fields["FieldName"]
2 votes
1 answer
103 views

How to mock MediaManager in Sitecore using nSubstitute and xUnit

I am in the process of setting up some unit tests for a Sitecore project (using this guide as a starting point: https://www.codeflood.net/blog/2020/05/17/logicless-view-itemless-model/) I have come ...
3 votes
1 answer
189 views

How to mock an ImageField in Sitecore using nSubstitute and xUnit

I am in the process of setting up some unit tests for a Sitecore project (using this guide as a starting point: https://www.codeflood.net/blog/2020/05/17/logicless-view-itemless-model/) I have come ...
2 votes
2 answers
314 views

What is the best way to check if the Item is being inherited from a template?

I am using Sitecore 10.1 and I am upgrading my code from the Sitecore 8.2 solutions. I want to know the best practice to check if the Item is being inherited from a template? The requirement is to use ...
  • 2,273
1 vote
1 answer
43 views

Sitecore Role creation API

Is there a Sitecore Role creation API similar to item creation ? Can I map user to roles using Sitecore REST API?
1 vote
1 answer
78 views

How to add a multiline text fields values in a single cell of excel in Sitecore MVC

I am using Sitecore 8.0 . We have one Export of data feature using Excel. For all the fields the data is getting exported in a cell properly ,but for the Multiline text field the text is getting ...
  • 191
0 votes
0 answers
62 views

How to display the JSON content of a SXA page in a sequential order in Sitecore 9.0.1?

We have a Sitecore SXA website. Sitecore version is 9.0.1, SXA version is 1.7. I am fetching the json data of a page by using default Sitecore resolvers and appending ?sc_device=json. But ...
  • 191
0 votes
1 answer
362 views

Sitecore CD Error Value cannot be null. Parameter name: item

I am getting an error when i try to hit any page in CD. It was fine and all of sudden started receiving this error. I am not able to figure out what caused this issue. Could anyone faced this issue ...
  • 125
0 votes
0 answers
34 views

How can I get all language versions of an item using the OData API?

I am retrieving a list of items using the OData REST API with the URL <server>/sitecore/api/ssc/aggregate/content/Items?sc_apikey=<key>. Without specifying a language parameter in the URL, ...
  • 103
0 votes
0 answers
32 views

Sitecore Commerce Bootstrap - Database Login Error

I am trying to get the commerce engine running. generated the toke and running the bootstrap command, getting the below error 'Login failed for user 'sa'. I have given full permissions on the commerce ...
  • 163
0 votes
1 answer
56 views

Change the template and retain the field value (internal link to a general link)

I have a template and it is inherited. I have a field called website. I need to change the website field from internal link to a general link. When i do that, I loose all the values. How can i retain ...
  • 55
0 votes
0 answers
104 views

Images show relative path in preview mode but in Normal it shows absolute path Media.MediaLinkServerUrl Setting

I have changed one of the settings in both cd and cm server in the Sitecore.config file to show the absolute path for our media images. The setting is Media.MediaLinkServerUrl <setting name="...
  • 55
0 votes
2 answers
89 views

Sitecore (version 8.2) Itemservice returns a 404 NotFound

As the title suggested, I'm getting a StatusCode NotFound (404). Everything as far as I know has been setup correctly. Been reading and following this to a T: https://doc.sitecore.com/en/developers/82/...

1
2 3 4 5
8