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

Sitecore ProcessMediaRequest is giving 404 for restricted media

I recently had a requirement to restrict secure media items to download so that only certain logged in users could download them. So to achieve that I have remove read access from the extranet\...
3 votes
3 answers
3k views

Sitecore 9 forms redirecting to formbuilder link on submit

I am having an issue when submitting a form when there is no redirect. Basically i have a contact us form and eventually will implement a email action. But every time i click the submit button even ...
1 vote
1 answer
109 views

Exception stack trace suggests exception occurred in line with calls to ID.TryParse

On our UAT environment, I am getting an exception on certain page types with a stacktrace pointing to a specific class and line number. The problem, is that the line in question should not be able to ...
1 vote
0 answers
25 views

Sitecore IP Geo location Service-Personalization with Geo-based conditions does not work in sitecore 9.1.0 [duplicate]

Sitecore Personalization using GEO IP is not working. Geoip service is working fine but default sitecore rule for geoip based is not working. Any help would be appreciated..
0 votes
0 answers
20 views

Order of Items in GetChildren method [duplicate]

I have Sitecore 9.3. I am using GetChildren() method to read all the children under a folder. I tried to identify a pattern in the sequencing of items but was unable to do so. I did saw the post at ...
3 votes
1 answer
337 views

clean up draft items in workbox

I have a requirement where I have to clean up the draft items in sitecore workbox which are there for more than two years in workbox. Can anybody tell me from where/how to start and how to access ...
0 votes
2 answers
487 views

Sitecore Item URL with Custom Domain in Azure PaaS

I have Sitecore 8.2 update 5 site deployed in Azure PaaS as an App Service. I have created a custom domain (e.g. abc.com) in the App Service. This custom domain is kept behind F5 firewall. I am facing ...
0 votes
0 answers
36 views

Looking for sitecore WF comment pipeline

I am looking to see if there a way to pre-fill the fields in the comment template, just wondering if there is a pipeline to do this?
1 vote
1 answer
185 views

Where are the Sitecore workflow comments stored?

I am looking for the Sitecore path where the WorkFlow comments are stored.
1 vote
1 answer
759 views

Editing Field In Save Event Handler Requires Two Saves to Populate Field Or In Lower Environment Requires A Different Field To Be Changed

For a Sitecore 8.2 solution I have a save event handler that populates a field on an item of several different templates based upon items that refer to its child items via the Link Database. That ...
0 votes
0 answers
753 views

GetItem() method returns null or outdated state of the item

We faced a problem with getting item data from DB. GetItem() method behaves in non deterministic way. We have two instances of Sitecore: clients instance 9.0 and our local instance 9.1. On clients ...
0 votes
1 answer
257 views

Return Sitecore item as list of Model

I am trying to return sitecore items list from my controller as list of model type eg. public List<PageContent> Results { get; set; } I need to get the list of items in Results. Using ...
2 votes
1 answer
332 views

Get Item in Code behind while security is applied on item

We need to show some items to some particular users on our website based on some security roles applied and need to show lock icons to other users. But in code behind we are getting null items, on ...
0 votes
3 answers
727 views

How can I know by code if the current sitecore instance is an XP or XM?

I want to be able to determine in code if the current Sitecore instance is an XP or XM. As far I can see there is no direct way to do this, am I correct? If so, would it be advised to check if xdb is ...
2 votes
2 answers
2k views

Sitecore support for async controller renderings

I am planning to use ASP.NET async pattern in my Sitecore project, but I'm getting the error: Asynchronous method which returns task as result cannot be executed synchronously Is there a way to ...
2 votes
1 answer
140 views

How to identify new entries in core databases

we have got an existing sitecore 8.1 instance complete database. Now we need to identify what are the entries available in the database. in master db we have identified easily by looking into all the ...
1 vote
1 answer
1k views

Basic Authentication in Sitecore and IIS

I want to give basic IIS authentication to a website build in Sitecore. I tried with the given code, however, it is creating the number of spaces in the return URL and not rendering the authentication ...
2 votes
1 answer
63 views

Making config settings configurable for user

I am using Sitecore 9.3, SXA. I want to make some of the current config settings configurable from within Sitecore. I have created a template with all of the fields (e.g. MediaResponse single text ...
-1 votes
1 answer
200 views

Item disappeared from Content Tree while renaming but appearing in Search

Recently a very strange issue happened with me. I renamed an item and after that it got disappeared from Content Tree but its still appearing in Sitecore Search. I checked in Standard fields and its ...
1 vote
0 answers
262 views

How to get General Link Field in RenderFieldArgs?

I have made a custom processor to add custom code to General Link Field and Rich Text Field. But in the (RenderFieldArgs args) I am only getting rich text field, the General Link Field is not coming. ...
1 vote
2 answers
255 views

How to allow only 1 role to have read access to an item?

I want specific website users to have access to the "Secret" pages of the website. I have created a new role in the Extranet domain i.e. Extranet/SecretPageRole. Now, how do I assign roles ...
1 vote
1 answer
202 views

Logging API Response from Entity Services

I've read through the developer's guide to Sitecore.Services.Client and I've successfully implemented a solution using REST against the Sitecore Entity Service. All of it works as expected. We're now ...
3 votes
0 answers
194 views

Is it possible to access "/sitecore/api/ssc/auth/login" API from Content Delivery?

We want to have token based authentication for the API set up in Sitecore Content Delivery (CD). Can we access /sitecore/api/ssc/auth/login API from Content Delivery?
1 vote
1 answer
160 views

Json Reference field in Json Variant return Error when the Reference Field Is empty

I am using SXA Json Content to create API. In the JSON Variant, I used Reference Field to display Drop Link Field in the data. But when the DropLink field is empty, the API returns error. So I need to ...
2 votes
0 answers
25 views

Any Performance bottlenecks in Sitecore (9.x) Security Feature in CD [closed]

We are working on oauth login with external IDP and we will create the virtual users after validation (Sitecore 9.3). Based on the claims, we will set certain (extranet) roles and custom profile ...
1 vote
0 answers
1k views

In MediaManager, how to get image's full url with specifed site's domain included?

The reason why I want to change the domain of an image url is because I'm providing an API to a third party. And the regulation is all media url and internal link url, needs to replace the default ...
3 votes
1 answer
137 views

OData Item service Support in Sitecore 8.2

For one of our new application[non-sitecore] we need some data from Sitecore Instance which is on version 8.2. We are looking for the available API options, Is OData Item Service is supportable with ...
2 votes
1 answer
2k views

How do I resolve 404 error returned by request.GetResponse() when trying to create a media library item via Sitecore Web API?

I am trying to create items in my Sitecore Media libary via Sitecore Web API. Our version of Sitecore is 8.2. My main concern is if I am formulating the request properly and if there is a place like ...
1 vote
0 answers
79 views

Is there a way to load multiple renderings in homepage/dashboard parallel in Sitecore 9.1?

Home page has about 15 renderings with each controller rendering calling different API for analytical data (external systems for graph,charts ,summarized data) hosted on Sitecore 9.1 Average max time ...
9 votes
1 answer
489 views

Item statistic "CreatedBy" returning empty string

I'm trying to get the creator of an item, but when I access the CreatedBy property, it returns an empty string. When I debugged I could see the all the other fields were populated, but not the ...
2 votes
3 answers
2k views

How to unlock sitecore items programmatically

The best practice for content editors is to check in Sitecore item after editiing is done.But they often don't follow this practice. So when some other Content editor comes to that item, he manually ...
1 vote
1 answer
283 views

Read Sitecore Item ID on user control on html tag

I created an Accordion component in Sitecore(web-forms) and it's working fine. But if I add multiple accordions on the same page it's opening up the first accordion even though if I click on the ...
1 vote
1 answer
841 views

How to remove 'route' object in Sitecore jss layout service api response?

When I get the data from http://{domain.name}/sitecore/api/layout/render/jss?item=/&sc_apikey=[api-key] Then response is like {sitecore: {context:{something}, route:{something}} But I don't want ...
2 votes
1 answer
634 views

The selected link Target value is not displayed after customising the Hyperlink Manager

Following on from a previous question on how to make customisations of the RTE upgrade safe, we have: 1) Customised the LinkManager.ascx to add a new property for the 'rel' attribute on the link. ...
0 votes
0 answers
71 views

How can I solve Server Error in '/' Application Index has not been initialized? [duplicate]

If I access my home page, show error like this : Server Error in '/' Application. Index has not been initialized. Description: An unhandled exception occurred. Exception Details: System....
1 vote
1 answer
81 views

.Net SDK Wrapper for Sitecore SSC REST API Item Service

As we know, Sitecore provides the ItemService [link] for developers to have a REST API interface for interacting with Sitecore items. What I am trying to achieve is to consume this REST Api from the ...
0 votes
1 answer
749 views

SXA retrieve SiteInfo for another site (not the context site)

In order to render alternate URL metadata, I need to get a SiteInfo object (Sitecore.Web.SiteInfo) for other sites apart from the context site. I have tried to use var otherSiteInfo = ...
1 vote
3 answers
1k views

Updating Item media field with specific media Sitecore powershell script

I have 400 product items. Previously, we have a common thumbnail image for all products. Now, I added a new image field (thumbnail image), all products I need to assign a common specific thumbnail ...
0 votes
0 answers
315 views

Retrieving Sitecore attachments/files via API

I’m a newbie to Sitecore. My client is using Sitecore as a document storage tool to store files in form of pdf, word, etc. The requirement is to fetch the files through Sitecore’s API from an external ...
2 votes
1 answer
505 views

Injecting dependencies into custom ServicesApiController without using ServiceLocator

I am injecting a dependency into a custom API controller I've created that is inheriting from ServicesApiController. I have found that I need to use our service locator class to do this as otherwise, ...
0 votes
1 answer
669 views

How can i get children Item from Item using Sitecore ItemService?

How can I get Children item using the Item service API? I retrieved parent item and fields using Item service API I got the result like below Json { "ItemID": "25a40733-babf-4f16-a025-...
0 votes
1 answer
45 views

Are there any JSS deploy events to which I can tap my custom code?

Just looking if there are any events that are triggered while doing jss deploy?Similar to the other events item:copied packageinstall:ended ...etc
1 vote
1 answer
445 views

Use Sitecore service Client Get Item or Item Id based on the Search term using fields

Is there any way to get Item or Item id using Sitecore Service client based on the fields in the master database. Search term: http://{host}/sitecore/api/ssc/item/search?term=12345&...
2 votes
1 answer
627 views

Setting up a basic contact form with Sitecore JSS (not using Sitecore Forms)

I'm building a JSS App and need to set up a basic contact form (sends an email). Since I'm using Sitecore 9.1, Sitecore Forms is unavailable in JSS. How do I set up an endpoint in Sitecore to send ...
0 votes
0 answers
79 views

How do we get Sellable or varient images through commerce api?

I have added the images in sitecore sellable item but in not getting the Images Detail in Sellable Api. {{ServiceHost}}/{{ShopsApi}}/SellableItems('NYRR Catalog,20001,20003')?$expand=Components($...
0 votes
1 answer
736 views

Making customisations of Sitecores Rich Text Editor dialogs upgrade safe

Looking at this: awareweb.com/blog/customizing-sitecores-rich-text-editor-dialogs and this Unable to customize HyperLink Manager in Rich Text Editor in Sitecore, if we want to override EditorPage.aspx,...
4 votes
1 answer
663 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
2 answers
793 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
1 answer
386 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
1 answer
561 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 2 3
4
5
8