We’re rewarding the question askers & reputations are being recalculated! Read more.

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
1
vote
2answers
33 views

Connecting console application to XConnect in Azure Sitecore 9.2

I'm using Sitecore 9.2 scaled environment on Azure, and am trying to make a console application connects to XConnect, am following this link from Sitecore documentation. In the part shown in the ...
0
votes
0answers
13 views

Sitecore APIs throwing ERR_TOO_MANY_REDIRECTS

We have exposed Sitecore's authoring server via two URLs: https:// www[dot]authoring[dot]sitename[dot]com/sitecore https:// authoring[dot]sitename[dot]com/sitecore Both the URLs were working fine ...
11
votes
3answers
424 views

When to use Sitecore.Context.Items and why?

I just found Sitecore.Context.Items object as part of the Sitecore.Context. What is the use-case of using it and when I shouldn't use it?
1
vote
0answers
35 views

Accessing the RenderingContext.Current.Rendering.Item on controller in Sitecore 9 [duplicate]

I'm trying to get the current item for filter search value. When im trying to access the RenderingContext.Current.Rendering.Item it showing some kind of error. Please find my screen shot below. 1. I'm ...
0
votes
0answers
26 views

Where do I add image slider home slot on sitecore client? [closed]

I add 5 slider image in the sitecore client. but only 3 were displayed. I checked in the JavaScript and only 3 were called It seems that the settings in the sitecore client Where can I set it?
0
votes
1answer
35 views

How to use Sitecore.Web.WebUtil.ExtractLanguageName?

there is a method called "ExtractLanguageName(string localPath)" in WebUtil, which is suppoed to extract the language from the request url (I think). But what value for "localPath" does this method ...
6
votes
3answers
191 views

Exposing ServiceApiController in Sitecore 9.2

I am trying to expose a MVC route in Sitecore 9.2 for a web api I am creating. I followed the steps describe here but it only works when my controller inherits from controller. If I inherit it to ...
4
votes
1answer
68 views

Is the 100 child item limit still a valid rule of thumb?

I always understood that Sitecore recommends having fewer than 100 items under a node. Is this rule still valid? Does having too many child items only impact the Content Editor when opening the ...
0
votes
0answers
21 views

Building a dynamic table using Sitecore Webforms

So I'm building a dynamic table using webforms . The header, sections, rows and columns are dynamic but the coumn count has to be same for the table. My table looks like this My Sitecore data ...
0
votes
0answers
46 views

Using Sitecore GraphQl in C# and send data to JSS

I am figuring out the Sitecore GraphQL Query where I need to use it as a query in my C# code (if that possible) where I just get all the items of a specific location in the Sitecore Tree. However, I ...
0
votes
1answer
52 views

SXA drop down filters reset button not working

I'm using in one page 3 SXA drop down filters (category, services, activity), search result and a reset button that clears the filters in the bellow script: function forceReset(){ if ($xa(".clear-...
0
votes
2answers
66 views

Need to open a particular pdf file on sitecore link

My website has so many pdf files and for some, I need to open the pdf file on the browser and for some, I need to download. I have got some solution i.e configuration in sitecore.config file but this ...
4
votes
1answer
68 views

JSS layout api returns 404 when item requested by display name

We are trying to use display names for URLs and it doesn't work with JSS. E.g. we have a page "search" which has a display name in NL: zoeken. when I request http://localhost:3000/en/search , the JSS ...
1
vote
1answer
42 views

How to add a css class dynamically for selected menu item?

I want to add "active" class for the selected menu item in Sitecore. I tried to add class by using jquery but whenever we click on menu the particular page is opening and that menu is loading again. ...
0
votes
0answers
27 views

Storing Cookie acceptance details

We have a requirement when end user accepts cookie pop-up, the details like the text of the pop-up/version, whether user accepted or rejected it, the userid/interactionid , timestamp. Is there any ...
4
votes
1answer
47 views

GraphQL Search facetOn Parameter

I'm trying to use the Sitecore GraphQL search function that takes in the "facetOn" parameter. Unfortunately I'm not having much luck with the results, and I suspect it's because I'm doing something ...
0
votes
0answers
42 views

Sitecore api call giving 404 on ajax post call on CD server [duplicate]

I am using sitecore 9.0 with SXA 1.8.1 I am trying to call a server side method using ajax call. The controller inherits ServicesApiController. The ajax Get method is works fine on CD server. But the ...
0
votes
1answer
35 views

How to create Dropdown dynamically for Sitecore languages in Sitecore(8.2) Web forms?

I want to create language selector in the site header. So for that i am trying to pick all language(/sitecore/system/Languages) from Sitecore dynamically using repeater. I am able to get language ...
2
votes
2answers
91 views

What is the fix for solr error 'undefined field _indexname' after building custom index in sitecore (v9.1.0)?

I created a new custom index named CUSTOM_SERVICES_INDEX using this command: C:\solr\solr-7.2.1\bin>solr.cmd create -c [custom index name] (cmd as administrator) then I created the config file ...
1
vote
1answer
32 views

How do you fetch Multilist Field values in Web Forms user control?

I am trying to access multilist field values in Visual studio ascx page using <asp:Repeater> web control. But i am not able to fetch the values from Sitecore. Which Sitecore webcontrol should we ...
0
votes
1answer
86 views

Getting a NullReferenceException error while rendering a multilist field value

I am trying to create a carousel in Sitecore 8.2. I have created a carousel item with the Image and Text fields and these carousel items are mapped to Multilist. I am getting a null reference error ...
1
vote
2answers
33 views

Programmatically getting Profile Image field from custom profile

I have an image field associated to my custom user profile template, but I am having trouble accessing the value of it programmatically. I have tried the following... Context.User.Profile....
2
votes
2answers
81 views

Difference between LinkProvider and LinkManager

To get the url of an item we can do it via LinkManager: var url1 = LinkManager.GetItemUrl(item); can even provide UrlOptions on it: var url2 = LinkManager.GetItemUrl(item, new UrlOptions() { ...
0
votes
1answer
31 views

Sitecore role in site1 when installed to site2, missing some restrictions in site2

For the new developer role we restricted access to Development tools in source site.When this role is packaged and installed in target site, it has permission to Development tools. How do we fix this ...
1
vote
1answer
42 views

Difference between FieldIDs.EnableItemFallback and FieldIDs.EnableLanguageFallback

I am currently setting my items in Sitecore programmatically: item.Fields[FieldIDs.EnableItemFallback].Value = "0"; This makes my non-English version to not have a fallback from EN. But then I ...
0
votes
0answers
31 views

Setting HideVersion = true, removes all language version from web database [duplicate]

I am creating items programmatically in a bucket folder. Publishing and unpublishing those items are also done programmatically. When unpublishing (Hiding from the site), my goal is to unpublish only ...
1
vote
1answer
50 views

Sitecore item API for shell site not returning the content

When I click on the "insert link" of the general link field, then the complete tree is not opened (as shown in the screenshot below), due to which I am not able to select the item. When I checked the ...
0
votes
1answer
65 views

Search Results not appearing in Coveo Search [closed]

I have implemented Coveo search in my application. Its working fine on Prod but stopped working on local. The search results are not appearing in local When I tried to figure out what is the issue , ...
0
votes
0answers
32 views

Sitecore.SharedSource.WebApiClient Not Found in Sitecore 9.0

The dll Sitecore.SharedSource.WebApiClient is not available in sitecore 9.0 . Is there any alternative way to use Sitecore shared source web api client in C#, in old version of sitecore project it was ...
0
votes
2answers
36 views

Domain level cookie in Sitecore

I need to set main domain(abc.dis.com) cookie in my sub domain(xyz.dis.com) in sitecore,please suggest. Please find the below code snippet,but it's not working. Thanks in Advance
1
vote
0answers
27 views

How can the Sitecore search API be extended to support Azure search traffic analytics?

I'm experimenting with adding support for conditionally returning SearchId for Azure search traffic analytics purposes (https://docs.microsoft.com/en-us/azure/search/search-traffic-analytics) as part ...
0
votes
1answer
49 views

What is the use of * in Hostname

Why we create Site like below in Site definition: <site name="Test Site"> <patch:attribute name="hostName">*</patch:attribute> <patch:attribute name="...
0
votes
1answer
25 views

Difference between site[@name='scheduler']" and site[@name='website'] in Site definition

What is the use of <site patch:before="site[@name='scheduler']" instead of <site patch:before="site[@name='website']"
2
votes
2answers
154 views

Sitecore Jobs and IIS Pool Recycles

From what I understand a Sitecore job simply runs as a background thread within the web application, i.e. a IIS worker process. How does this work with the periodic IIS pool recycling? I mean if you ...
1
vote
2answers
96 views

What is Sitecore.Abstractions dll?

I am getting error: System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly '**Sitecore.Abstractions**, Version=10.0.0.0, Culture=neutral, PublicKeyToken=...
0
votes
0answers
78 views

Message: Value cannot be null. Parameter name: context.Contact

I am working on Sitecore 8.2 version. I am getting an exception in production environment log file. I am not able to replicate same issue in my local neither able to figure out why this issue is ...
1
vote
1answer
26 views

Programatically set publishing options to Sitecore for specific language version

I wanted my sitecore item to publish only a particular language version. For example, I have english and French, but I only want to publish the French language. My plan is to set the "Publishable To" ...
1
vote
1answer
94 views

Glassmapper 5 SitecoreChildren listing items even if the version count is 0

We upgraded Glass Mapper version from 4.2.1.190 to 5.4.21.0. In our model, we are using [SitecoreChildren(InferType = true)] to get the child items. For few of the child items, language fallback is ...
0
votes
1answer
57 views

How to get the component item when debug from the page?

I have a Template for Page and in my layout, I have provided placeholder let’s say for example Header. I am previewing my page and trying to debug my component view of the Header, I am trying to get ...
1
vote
0answers
60 views

How to get Item from ItemID in JSS? [closed]

I am trying to understand how to fetch Item from ItemID in JSS. What is alternative for Sitecore.Context.Database.GetItem(new ID("{11111111-1111-1111-1111-111111111111}")) in JSS?
3
votes
1answer
47 views

How do I show custom error message on OnItemSaved event?

The ask is to show the following kind of message on the OnItemSaved event. I am unable to show a similar custom message on the OnItemSaved event. I am always getting some default exception ...
1
vote
0answers
45 views

JSS Headless mode issue

I am trying to run my local jss app in headless mode. while trying to hit the jss service, I am not getting the expected o\p. I can the security info object has 401 as statuscode. If I try hitting ...
1
vote
1answer
66 views

GraphQL Filter on PageType

I have been successfully using GraphQL to filter on items assigned to a specific template. Is it possible to do the same with items of a certain PageType?
2
votes
1answer
61 views

@Html.Sitecore().Rendering does not rendering view even after executing without any errors

I am trying to use @Html.Sitecore().Rendering("--id--", Model.Property) to call render a staic view. It is not rendering on page. Layout: @Html.Sitecore().Rendering("--Myviewid--", Model) Myview: @...
0
votes
2answers
38 views

Is it possible to get page content dynamically (Not HTML but field values which are displayed on the page)?

Is it possible to get the few renderings' (present on the page) contents dynamically, but the catch is like I don't want HTML instead I want the field values which are used to be displayed on the page....
1
vote
1answer
76 views

Sitecore domain and sub domain authentication

Parent Site Url: www.site1.com Sub Domain Url: www.abc.site1.com We have the requirement like create the sub domain(abc.site1.com) in separate instance and use the login & registration ...
1
vote
1answer
111 views

Sitecore.context.item is null in sitecore 9 custom form submit action?

I created a item in sitecore and added sitecore 9 forms rendering to that item. I have created custom form submit action and saved data to custom database. In my custom save i have used customData....
0
votes
1answer
55 views

Method not found: 'Boolean Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.get_EnableHttpCache()'

After upgrading from Sitecore 8.2 to Sitecore 9.1, which updated the Sitecore.ContentSearch.SolrProvider to v4.0.0.0, the code compiles fine but we get the following when trying to access the site: ...
1
vote
0answers
36 views

What's the best way to upstream and downstream media in Sitecore?

Recently I came across a requirement to define the best strategy to upload and download media for Mobile App. Website data is managed under Sitecore CMS currently. At first glance, below thoughts ...
2
votes
1answer
148 views

Error occurred while loading Experience Profile

I am facing an issue where the error is occurring while loading the Experience Profile. I am working on Sitecore 9.0.2 version. Error is shown as below:- When I hit the Sitecore API URL as shown ...