Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

-1
votes
0answers
24 views

Instance to Tracker object doesn't exist

Tracker.Current.Contact.IsNew || Tracker.Current.Contact.Identifiers.Count == 0; [NullReferenceException: Object reference not set to an instance of an object.] Reply.Foundation.Accounts....
0
votes
1answer
31 views

'Sitecore.SecurityModel.Cryptography.IHashEncryption' from assembly 'Sitecore.Kernel

I have this problem with the instance of the Sitecore. A made a publish from VS project with the same Sitecore.Kernel.dll and Sitecore.Mvc.Dll of the instance. After that I cann't reach anymore the ...
1
vote
2answers
45 views

Sitecore 9 forms redirecting to formbuilder link on submit

I am having an issue when submitting a form when there is no redirect. Basically i have a contact us form and eventually will implement a email action. But every time i click the submit button even ...
0
votes
1answer
47 views

Sitecore JSS react overview + create pages

I'm very new to sitecore and trying to get my head around how it all fits together. What i'm trying to get my head around is how the concept of pages fit in with react and JSS. How do you map pages (...
3
votes
1answer
74 views

What’s the best practice to Expose Sitecore 9 APIs for Mobile Apps Development? [closed]

Currently, I am looking Sitecore CMS solution for native mobile app development. Mobile App Team is using Swift for IOS and Java for Android. So we have a limitation to use JSS react native for ...
2
votes
2answers
56 views

How to retrieve image url in MVC view from model

I am new to Sitecore. I am trying to create a small demo which will display all the products with its image and description. But i am getting error in my view also i am not able to display anything. ...
0
votes
1answer
30 views

Unable to install sitecore.mvc.analytics in sitecore 9.1 solution

I have Sitecore 9.1 installed and am working through a Sitecore student lab. I am targeting .net framework 4.7.2. I have: Sitecore.MVC (3) Sitecore.Kernel (12) Microsoft.ASPNet.Mvc (5.2.4) I need ...
2
votes
0answers
27 views

Logic for Enroll contacts from list in Sitecore 9.1

There is a new cool feature called Enroll contacts from list in Sitecore 9.1: I'm wondering where the actual logic resists (which assembly and class). I'm going to utilize this functionality by ...
0
votes
0answers
40 views

jQuery AJAX GET request returning “parsererror” error response message

In a scope of Sitecore Web project an API Contoller is used. Got the following response error message during jQuery AJAX GET API request: On a back-end side I use IHttpActionResult action method that ...
0
votes
0answers
65 views

Sitecore SolrNet - The given key was not present in the dictionary error

We are using SolrNet open source client in Sitecore 9.0 update2 and SXA 1.7 version. We have written this code to get SolrConnection: Assert.ArgumentNotNull(searchcontext, "searchcontext"); var ...
4
votes
0answers
105 views

Login to sitecore across multiple subdomains

I am trying to login to Sitecore across multiple domains. I mean, i have two different sites abc.x.com and xyz.x.com. is there a way to set the auth cookies at parent domain level, in my case at x....
3
votes
0answers
15 views

Restoring marketing taxonomies with Sitecore powershell extenstion

I am trying to automate Sitecore upgrade from 8.1 to 9.0.1. In Upgrade steps, There is one step restoring deleted marketing taxonomies, which can easily be done with Url navigation and click button on ...
0
votes
1answer
73 views

How to remove 'route' object in Sitecore jss layout service api response?

When I get the data from http://{domain.name}/sitecore/api/layout/render/jss?item=/&sc_apikey=[api-key] Then response is like {sitecore: {context:{something}, route:{something}} But I don't want ...
3
votes
1answer
98 views

LinkManager.Provider is deprecated in Sitecore 9, how to get the default provider then?

The following code works in Sitecore 8.2 but not in Sitecore 9: var provider = LinkManager.Provider; The Provider property is not available anymore in Sitecore 9 Sitecore.Kernel, what should I use ...
1
vote
1answer
42 views

Error while saving SXA page from Experience Editor [closed]

I am trying to save the page after doing edits in SXA page from Experience editor and getting below error every time. This is occuring only for this page. In network tab, the response for ...
3
votes
1answer
107 views

Sitecore 9 in Azure PaaS : Add Application Insights SDK

For Sitecore 9 on Azure PaaS and newer versions, what is the best practice to Add and configure the Application Insights SDK in Visual Studio to generate some telemetry in Visual Studio. As we are ...
7
votes
1answer
103 views

Is there a method in Sitecore's utilities to format a numerical file size in a friendly way?

The title pretty much says it all. I feel like I've come across a method in the past that does something like: long fileSize = 524288000; string prettyFileSize = Sitecore.SomeUtility....
0
votes
1answer
45 views

Unable to fetch item using getitem method

I was trying to access item using getitem method from SOAP service. Sitecore.Data.Items.Item item = Sitecore.context.Database.GetItem(<ID>) But Item is null. I tried to fetch using Id and path ...
0
votes
0answers
111 views

Programmatically move items from web to master database?

I have a utility page that creates Sitecore items from a csv file. This utility page is used to import thousands of items at a time, which are used for interactive map data. The items are stored in ...
1
vote
1answer
37 views

Get prefetch cache created status

Is there any way to understand the status of prefecth cache ? What i want to understand is that if the prefetch is already created or not ? When i disassemble the sitecore.kernal , I see a property ...
0
votes
1answer
70 views

User Profile table in SQL

I am saving a user profile and one of the field is "UserLanguage" which is saving fine Context.User.Profile.Save(); The save method is working as expected but where the User Profile being saved in ...
2
votes
1answer
31 views

Fetching Final renderings in an .aspx page

I am creating a script to fetch rendering parameters of a sublayout and edit data template item field data based on the values of fields of rendering parameters. I was able to fetch renderings in ....
0
votes
1answer
43 views

WFFM custom toggle switch [closed]

I am adding toggle switch as a custom field. Toggle.cs (Toggle C# code) public class Toggle: Sitecore.Form.Web.UI.Controls.Checkbox { } public class ToggleField : Sitecore.Forms.Mvc....
0
votes
1answer
125 views

Sitecore support for async controller renderings

I am planning to use ASP.NET async pattern in my Sitecore project, but I'm getting the error: Asynchronous method which returns task as result cannot be executed synchronously Is there a way to ...
8
votes
2answers
128 views

What is alternative of “.PageMode.IsExperienceEditor” property in JSS-react?

What is alternative of .PageMode.IsExperienceEditor property of Sitecore.Context in JSS-react to verify the ExperienceEditor context ?
1
vote
1answer
84 views

Sitecore keywords in the metadata

Lets say we have 4 renderings on the Page and each rendering has a data source attached to it which has a Keyword field that is being used for SEO purpose. Is it possible to get all the attached ...
1
vote
1answer
102 views

How to add renderings programmatically when another rendering is added

Which pipeline should I use when a new rendering is added in the presentation? I have a scenario to add renderings programmatically if a particular rendering is added in the item. I will write a ...
2
votes
1answer
80 views

Unable to retrieve a Sitecore Item

I am trying to retrieve a Sitecore.Data.Items.Item using this line: var myItem = Context.Database.GetItem("/sitecore/content/x"); but instead of an Item I get a null exception. I have also tried ...
0
votes
1answer
95 views

EXM report is empty (data is not being captured) in scaled environment

I am working with Sitecore 9.0 update 2 on Azure. Server is scale out : 1CM and 3CD. After email campaign is run, we can receive email but reporting is not working. It doesn't have any data is as ...
16
votes
3answers
1k views

What does headless mean in the context of Sitecore?

There have been numerous discussions around headless capabilities supported by the Sitecore platform. What does that even mean? What product offerings from Sitecore support headless capabilities? ...
1
vote
0answers
29 views

Not able to create a new SXA Accordian items in IE

I am trying to add a new SXA Accordian component from Experience editor in IE but not able to get 'Create' link which is working fine in Chrome. PFB Screenshots
4
votes
1answer
66 views

Content Item batch retrieval in .Net code?

Is there a way to retrieve a set of content items from Sitecore's APIs in batches, besides using the REST API? I'm looking at improving performance for a client's Sitecore site. A lot of the legacy ...
1
vote
1answer
22 views

Creating an item with the API returns 201, but then I cannot find the item?

Note: I am using a trial instance of Sitecore 9.0.2. I create an item: curl -X POST \ https://mysitecoreurl/sitecore/api/ssc/item/%2Fsitecore%2Fcontent%2FHome%2Ffolder1 \ -H 'Content-Type: ...
0
votes
1answer
140 views

How to check Server side whether session is time out or not?

As I am new to Sitecore and working on session time out functionality in Sitecore. Instead of redirecting to login page I've to display session time out warning message to end user and How to validate ...
2
votes
2answers
97 views

Custom Experience Button edit the Datasource item fields

I need to add a new button in the custom experience button. I watched some https://www.youtube.com/watch?v=D6jqqaBMu0s regarding the field editor button. That field editor gives you option to only ...
0
votes
0answers
33 views

“virtual” sites in the navigation tree

When I have have my navigation tree with page X and page Y and some content on page X and I need to show the same page X with the same content under an other content tree. E.g. page X under page Z. ...
1
vote
1answer
92 views

Experience Profile custom facet retrieval error

I was trying to create custom facets in Sitecore 9.0 Update 1. I was able to create one and add a custom tab in experience profile. I fill the custom facet data with the help of a WFFM form. I see the ...
2
votes
1answer
71 views

Updating droplink field value by name

I'm trying to update a droplink field value using its name but I get the following error: Value not in the selection list The code is item.Fields["__Subitems Sorting"].Value = sort; // sort ...
3
votes
2answers
304 views

Headless CMS : Sitecore vs Contentful

We are currently using Sitecore for one project but did not use JSS anywhere. Other project team plans to use headless CMS and considering "Contentful" CMS for this. Could you please anyone can ...
1
vote
2answers
99 views

RESTful API for getting incremental changes?

I would like to call an API to Sitecore to get changes of Media Library files stored in Sitecore. So given a Media Library, I would like to list the New Files, Updated Files and Deleted files since a ...
1
vote
2answers
81 views

Force saving of an item

I have several newly added save events for existing items. Any way to force a save of an item? When I do $item.Editing.BeginEdit() / $item.Editing.EndEdit() in PowerShell it returns false since ...
2
votes
1answer
53 views

What do I need to do to display an image on my web page using the ItemService API?

I've uploaded a few images of kittens, teddy bears, flowers, and other cute things to a folder within the Sitecore Media Library. I now need to access them using the ItemService API and display them ...
3
votes
0answers
119 views

Unable to get Dictionary Item value using sitecore Scheduler event

I have created A Sitecore Scheduled Task to send email. I have to read some settings from a Sitecore Dictionary but receiving only key not value. After debugging I have found that Sitecore.Context is ...
0
votes
1answer
140 views

How to integrate an external API with Catalog in Sitecore Commerce 9.0.2

I want to fetch the data from an external API and show it for my Catalog items. The API basically contains the details of my sellable items like product price, name and other details which properties ...
2
votes
1answer
115 views

Action methods in ServiceApiController is not catching the request

I'm using Sitecore 9 and I have created a ServiceApiController to enhance Sitecore API. I put a simple action method but it doesn't catch any request and I get this exception: Document not found - ...
1
vote
1answer
259 views

How can I add custom catalog attributes in Sitecore Experience commerce 9 and populate it with data from API?

I want to add new attributes for my catalog in Sitecore Experience Commerce 9 update 2 but not sure how to add it using the Sitecore Experience platform. Moreover all the properties data need to be ...
1
vote
1answer
96 views

Experience Explorer 403 forbidden on sitecore api ajax call

I'm encountering an issue which I can't resolve : using explore mode in the experience editor, I get 403 errors when trying to see any of the data from the current visit (the tabs and accordions are ...
5
votes
1answer
216 views

What is the ShutdownGuard and how should I use it?

I heard someone mention the use of ShutdownGuard for long running precesses. How does one properly make use of this and what are some cautions around its usage?
0
votes
0answers
34 views

Create an item with all its language versions at once using the Restful ItemService API

I'm trying to create an item using the RESTful ItemService API in javascript using this code : var xhr = new XMLHttpRequest(); xhr.open("POST", "http://<your server>/sitecore/api/ssc/item/...
0
votes
0answers
65 views

Convert string to LinkField [duplicate]

I need to convert string (received from SOLR, for example) to LinkField to have an ability to get the URL later. string rawString = "<link linktype=\"external\" url=\"http://some-url/find-and-...