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
1answer
129 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-...
8
votes
2answers
526 views

How to copy an item to multiple locations

What is the easiest and quickest way to copy an item to various locations? I have about 100 multisites in a solution and I have created a new template. I need to create a new item inheriting this ...
0
votes
1answer
48 views

redirect to error page if requested language in URL not configured [duplicate]

we have multilingual (FR / EN ) website .the issue is if we test with others language in URL like www/mydomain.com/dE empty site will disply our requirement is to redirect to error page in case if ...
0
votes
1answer
182 views

Password type field of Sitecore Item getting exposed on Version compare popup Window

I am facing a very strange issue in Sitecore 8.1 update2 instance. There is a field of Password type. Though in content Editor its value appears in dots format but on clicking Version-> Compare button,...
1
vote
0answers
59 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 ...
1
vote
0answers
125 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
61 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
55 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 ...
2
votes
0answers
113 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
73 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 ...
0
votes
0answers
26 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
41 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
44 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
118 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 ...
13
votes
3answers
1k 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
80 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 ...
8
votes
3answers
517 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
287 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
34 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
89 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 ...
1
vote
1answer
112 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
72 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
190 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
172 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
337 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 ...
1
vote
2answers
73 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
195 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
154 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
30 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
142 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
82 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
165 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
104 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
312 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
130 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
2answers
598 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
41 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
48 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
34 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
0answers
81 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?
2
votes
2answers
316 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
70 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
875 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
2answers
55 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
56 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
57 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
26 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
359 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
500 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
220 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 ...