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
1answer
23 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
15 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
41 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
1answer
40 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
32 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
17 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
37 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
38 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 ...
3
votes
1answer
36 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
31 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 ...
0
votes
0answers
22 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
41 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
1answer
33 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
52 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
33 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
33 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
33 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
0answers
76 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
68 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
49 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
38 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
121 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
37 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
36 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
97 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....
1
vote
0answers
67 views

Invalid URI : Hostname couldnot be parsed

Exception: System.UriFormatException Message: Invalid URI: The hostname could not be parsed. Source: System at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at ...
4
votes
1answer
58 views

“Error occurred” (500) when collecting basic information about your Sitecore installation

I have raised a ticket on the Sitecore support portal. They asked me to provide basic information about my Sitecore site from each instance in your environment. Check the article https://kb.sitecore....
0
votes
2answers
54 views

Can I have multiple the same facet types with different facet keys?

in every article and documentation I can see they are using for one facet type one (default) facet key. MyCustomFacet facet = new MyCustomFacet(); var facetReference = new FacetReference(contact, ...
2
votes
0answers
51 views

Index update process are running repeatedly in same index

We have this api that is creating and publishing item programmatically. (This item is created under a bucket folder). I've checked the logs and noticed that in between the process, our index are being ...
-1
votes
1answer
60 views

Get all the media items on the current page [closed]

I want to get all the Sitecore media items on the current page. This could be an image, video, pdf ,mp3 or docx Has anyone done something similar to this? What i am currently doing is Getting all ...
0
votes
2answers
66 views

Is there any way to render the Page instead of item name with the specific field of text?

I got the requirement from our client that he wants to render the Page instead of page item name with the specific field text. Ex: I have a page item name as "findyourmarket". So this page will ...
1
vote
1answer
176 views

JWT tokens for authentication for 9.0 UPDATE 1

I have an instance running SxC 9.0 update 1. I was working on an API which had to be consumed by a 3rd party application. Can you provide some input for using token bear mechanism to protect my API. ...
1
vote
1answer
73 views

How to check access right in SitecoreController for Sitecore 9.1

In my JSON controller I want to check the access right from the User. My code looks like this public class MyController : SitecoreController { public static bool CheckAccessRight() { ...
4
votes
2answers
47 views

Is Virtual user concept available in XM version?

One of the client is having an XM license and they need to implement the virtual user concept of the Sitecore do they need to update the existing licence or this feature is already supported with the ...
0
votes
2answers
139 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
1answer
97 views

Accessing SXA Site Grouping Site Settings Properties from Code

I have a SXA site created and under "/settings/Site Grouping" I have defined a Site item. I want to access "Other Properties" fields (ex: "dictionaryPath" which I have added into Other properties) ...
0
votes
1answer
85 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 ...
0
votes
0answers
49 views

Sitecore Commerce 9 - B2B Organizations Support

Does Sitecore Commerce 9 or Sitecore XP supports B2B OOTB? So, here what I mean: Organization: organization should contains multiple users with multiple roles, it should contain different fields, ...
3
votes
1answer
44 views

Create media item and specify item id

I have a scenario where I need site visitors to be able to upload media items via CD server. My plan is to upload to web database first and use EventQueues to then have the CM server fetch the ...
2
votes
1answer
183 views

Sitecore Glass Mapper 5.3.15 not loading children by default

I have upgraded the website to Sitecore 9.0.2 and since my project has a dependency on Glass mapper, I have upgraded Glass mapper to 5.3.15. My Glass mapper maps to the menu model and it does load ...
0
votes
0answers
27 views

Many Virtual Users entries are there in Sitecore core database Properties table [duplicate]

Below are the two queries and their outputs we ran in core database of our production enviroment and 98% of entries are from sitecore\virtualssuser. I think because of this, Sitecore client login ...
2
votes
2answers
74 views

Sxa tokens not taken into account in code query

I am working on a custom field which is based on :https://marketplace.sitecore.net/en/Modules/A/Advance_Image_Field.aspx I am trying to make it suitable for SXA by changing the way to find thumbnails....
0
votes
0answers
78 views

The partial view '/Areas/company/Views/PartialLayouts/SpotContainer.cshtml' was not found or no view engine supports the searched locations

Recently we have upgraded Sitecore from 8.1 version to 9.0.1 version. After upgrade few of the pages were not able to load and it is showing following error. The partial view '/Areas/company/Views/...
1
vote
1answer
30 views

GetItemUrl page name casing

I am creating a page url from a Sitecore item using the following code: var pageUrl = LinkManager.GetItemUrl(item); The Sitecore item starts with a capital letter, e.g. Page. At one machine ...
0
votes
1answer
59 views

sitecore language selector in site header

i have multi-language sitecore website and i m trying to create a language selector in my site header to change site language . im trying this code but not working : @{ string siteurl = string....
0
votes
0answers
24 views

Workflow process - Log the actions in JIRA [duplicate]

I have created a workflow for content editors. Once they edit the contents, I would like that to be logged in JIRA. Is there a way to link the sitecore item with the JIRA ticket?
0
votes
1answer
22 views

Sitecore Analytics api new method in 9.0 version

We recently upgraded our project to Sitecore9 initial release from 7.2. We were re-compiling our code including latest Sitecore.Analytics.dll We are getting this error if (Tracker.IsActive) { ...
1
vote
1answer
63 views

Droplink value is always returning null in post action

I am trying to build a form which contains state as droplink and given datasource as states . here's the snippets of my employee model and state. i am getting all the states in the get action of ...
2
votes
1answer
112 views

How to fetch users in particular domain programmatically in Sitecore9

We recently upgraded our project to Sitecore9 initial release from 7.2. We were re-compiling our code including latest Sitecore.Kernel. We got this error: error CS0117: 'Factory' does not contain a ...
0
votes
1answer
69 views

Show Multi-list selected items on view by glass mapper

I am able to get Guid of seleced items by Glass Mapper but i don't know how i can get those item by Id and show them on view. Glass mapper property that i am using is: [SitecoreField("Media Links")] ...