Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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

Sitecore boost value is not working in sitecore 9.1 and solr 7.2.1

I have assigned the boost value to all page in sitecore and then index. But sitecore search API do not doing the sorting based on the boost Value. Please suggest
0
votes
0answers
12 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
32 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
31 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
58 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
60 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
39 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
44 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
39 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
34 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
59 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 ...
0
votes
1answer
31 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
84 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
32 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
70 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
26 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
39 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
44 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
34 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
24 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
108 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
87 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
67 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
20 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
79 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
56 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
41 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
58 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
50 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
74 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
89 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
49 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
143 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 ...
2
votes
1answer
124 views

Sitecore SXA Azure Search Facets Returning 400 Bad Request when there are more than 50 results

I have a search page that is working correctly on my local instance using SOLR, but when we move the page to our AZURE Instance it fails. The AZURE Instance is using AZURE Search instead SOLR. If I ...
-1
votes
1answer
80 views

Sitecore came up with GraphQL in 9.2, so internally does they use Sitecore API?

What does GraphQL use internally to query the Sitecore items?
0
votes
0answers
49 views

How to retrieve an item in Draft workflow state

I have a script that goes through the tree starting at a certain node to find all items of a specified language version not in a publish workflow state and switch them over to the publish state. ...
1
vote
1answer
172 views

Sitecore custom api routing is not working

We have a multi-site environment. In one of the module, we are calling the same controller/action from all the sites. Perhaps, the same Javascript file which calls this controller/action is ...
0
votes
0answers
43 views

Calling component from another component via anchor link

I have a modal component which is basically a popup with some content in it. I have to ask if it is possible to link that component from another component. For example I have anchor link in another ...
0
votes
1answer
64 views

Add recipient list in EXM programmatically - Sitecore 9.1.1

I was looking for how to add a list to the Included Recipient List section to an EXM MessageItem programmatically. In Sitecore 8.2 you could do MessageItem.RecipientManager....
0
votes
1answer
242 views

Read URL from Rendering Parameter General Link in Sitecore 9

I have used general Link as rendering parameter . How I can extract URL in c#. For Single line text I am using below piece of code. var renderingModel = Sitecore.Mvc.Presentation.RenderingContext....