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
0
votes
0answers
19 views

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

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
24 views

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

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
0answers
21 views

System.InvalidOperationException: contextDatabase - Sitecore.Forms.Core.Dependencies.DefaultImplItemRepository [closed]

I am trying to upgrade from sitecore 8.1 to 9.0. A fresh Sitecore 9 instance was working fine and I have installed WFFM, and published the code to newly installed Sitecore 9 instance. I am able to ...
0
votes
1answer
34 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
189 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
66 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
20 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
45 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 ...
2
votes
1answer
147 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 ...
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
49 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-...
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 ...
0
votes
2answers
65 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
0answers
236 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 ...
2
votes
2answers
88 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
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....
1
vote
1answer
41 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. ...
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
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 ...
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 ...
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
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
1answer
49 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 ...
1
vote
1answer
151 views

List Manager not indexing contacts after CSV import

I am using EXM, and trying to upload contacts via List Manager. After uploading csv I found that recipients are still 0 so I opened log file and I found some Exceptions like that and I would like if ...
1
vote
1answer
64 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?
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 ...
2
votes
2answers
77 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
30 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
41 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 ...
3
votes
1answer
240 views

How to track the user behavior and personalization on mobile Apps using Xamarin Sitecore SDK?

I need to provide the personalized content to the mobile apps through SSC/Sitecore mobile SDK and track the user behavior and capture in the xDB. As per my understanding, "Sitecore Mobile SDK ...
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 ...
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
0answers
59 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?
1
vote
2answers
93 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
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 , ...
2
votes
2answers
316 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 ...
5
votes
2answers
625 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 anyone please explain the ...
4
votes
1answer
566 views

Getting the page ID when clicking a custom link field in Sitecore

I am creating a new link field in Sitecore following this link: Link for custom link field I have successfully created one called modal link. Specifically I want to get all the modal components that ...
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
1answer
75 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
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']"
1
vote
2answers
222 views

'There are no forms to display' message in Sitecore 9 Forms Dashboard

I am getting 'There are no forms to display' message in Sitecore 9 Forms Dashboard in Production environment In chrome developer tools, getting below error message in Console tab with below error ...
2
votes
2answers
151 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 ...
0
votes
0answers
76 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
24 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
93 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 ...
3
votes
1answer
44 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 ...