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
2answers
346 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 ...
1
vote
0answers
28 views

How to execute stored procedure using Sitecore.Data.DataProviders.Sql.SqlDataApi

I am trying to execute SQL stored procedure from C# code using Sitecore data providers. I am using the SqlDataApi class from Sitecore.Data.DataProviders.Sql but not finding any method which accepts a ...
4
votes
1answer
583 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
1answer
50 views

Changing the language does not retain the URL and path is chopped off after content item

I have implemented Item resolver for item "quote" [home->quote] like http://sss.com/quote/Certquote/32 by implementing public class CustomItemResolverForQuote : HttpRequestProcessor { .... } ...
1
vote
0answers
60 views

How can create new score profiling into Sitecore?

I am indexing Sitecore items into Azure and performing the Azure search via Azure functions. I want to create a new Scoring Profile into Sitecore and use it during the search. I am not getting much ...
1
vote
1answer
51 views

Extra versions of items are created in other language

I am using Sitecore 9.0.2 and I have a listing page created by custom code, not sxa components. I am trying to get items using the context database and then querying its descendants using Item ...
1
vote
1answer
29 views

Maintenance Page in Sitecore Azure PaaS

I have a Sitecore 9.0.2 environment in Azure PaaS. It is connecting to different third party services to get and data. Whenever third party update their system or make any new release our portal goes ...
1
vote
1answer
54 views

Unable to customize HyperLink Manager in Rich Text Editor in Sitecore

I am trying to customize the HyperLink Manager in Rich Text Editor to add some extra fields. Sitecore version: 9.2 I followed these two articles: https://www.awareweb.com/blog/customizing-sitecores-...
2
votes
0answers
42 views

Images are broken on Safari Browser [closed]

I'm using Sitecore 9.1, JSS and ReactJS. Some of the images are not showing on Safari but working fine on Chrome. Here's a sample url: /-/media/Intelligence-Bank/Folder/Folder/Logo/Logo.png?h=422&...
-1
votes
1answer
41 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 ...
1
vote
1answer
81 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 ...
0
votes
0answers
14 views

Issue - A tag scoring function must have tag parameters specified

I am trying to add new custom score profile into Sitecore for Azure Search as given below Added in the Sitecore.ContentSearch.Azure.DefaultIndexConfiguration.config file. <scoringProfile ...
1
vote
1answer
30 views

page template and his base template instance items

I have an Item in Sitecore, and I know it's derived from a certain base template. I have that base template ID, but I want to get the instance of this base template that is part of my page. I want it ...
1
vote
0answers
34 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 ...
3
votes
2answers
67 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 ...
12
votes
3answers
514 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
36 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 ...
6
votes
3answers
215 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
82 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
55 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
157 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
44 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
54 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
86 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
75 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
242 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
130 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
35 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
45 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
62 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
37 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
87 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
59 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
178 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
71 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
60 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
116 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
36 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
43 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
254 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
39 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
64 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
113 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 , ...
5
votes
2answers
657 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 ...
0
votes
0answers
33 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 ...