Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
34 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
19 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
42 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
56 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 ...
3
votes
1answer
45 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
41 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
33 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
54 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
92 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
61 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
36 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
77 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 ...
0
votes
1answer
50 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
69 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
43 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
30 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
115 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
63 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
47 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
28 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
52 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) { ...
0
votes
1answer
37 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
109 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
56 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")] ...
0
votes
0answers
54 views

Multilist items render on MVC view by razor sysntax

I have a footer template that have Title, Description and links. Links are multi-list. I need to render the selected items from links multi-list with Title and description on footer view. I know how ...
0
votes
1answer
59 views

'Sitecore.SecurityModel.Cryptography.IHashEncryption' from assembly 'Sitecore.Kernel

I have this problem with the instance of the Sitecore. A made a publish from VS project with the same Sitecore.Kernel.dll and Sitecore.Mvc.Dll of the instance. After that I cann't reach anymore the ...
1
vote
2answers
234 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 ...
4
votes
1answer
142 views

What’s the best practice to Expose Sitecore 9 APIs for Mobile Apps Development? [closed]

Currently, I am looking Sitecore CMS solution for native mobile app development. Mobile App Team is using Swift for IOS and Java for Android. So we have a limitation to use JSS react native for ...
2
votes
2answers
159 views

How to retrieve image url in MVC view from model

I am new to Sitecore. I am trying to create a small demo which will display all the products with its image and description. But i am getting error in my view also i am not able to display anything. ...
0
votes
1answer
68 views

Unable to install sitecore.mvc.analytics in sitecore 9.1 solution

I have Sitecore 9.1 installed and am working through a Sitecore student lab. I am targeting .net framework 4.7.2. I have: Sitecore.MVC (3) Sitecore.Kernel (12) Microsoft.ASPNet.Mvc (5.2.4) I need ...
4
votes
1answer
50 views

Logic for Enroll contacts from list in Sitecore 9.1

There is a new cool feature called Enroll contacts from list in Sitecore 9.1: I'm wondering where the actual logic resists (which assembly and class). I'm going to utilize this functionality by ...
1
vote
0answers
147 views

jQuery AJAX GET request returning “parsererror” error response message

In a scope of Sitecore Web project an API Contoller is used. Got the following response error message during jQuery AJAX GET API request: On a back-end side I use IHttpActionResult action method that ...
0
votes
0answers
162 views

Sitecore SolrNet - The given key was not present in the dictionary error

We are using SolrNet open source client in Sitecore 9.0 update2 and SXA 1.7 version. We have written this code to get SolrConnection: Assert.ArgumentNotNull(searchcontext, "searchcontext"); var ...
8
votes
2answers
255 views

Login to Sitecore 9.1 across multiple subdomains

I am trying to login to Sitecore across multiple domains. I mean, I have two different sites abc.x.com and xyz.x.com. is there a way to set the auth cookies at parent domain level, in my case at x....
3
votes
0answers
18 views

Restoring marketing taxonomies with Sitecore powershell extenstion

I am trying to automate Sitecore upgrade from 8.1 to 9.0.1. In Upgrade steps, There is one step restoring deleted marketing taxonomies, which can easily be done with Url navigation and click button on ...
0
votes
1answer
144 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 ...
3
votes
1answer
244 views

LinkManager.Provider is deprecated in Sitecore 9, how to get the default provider then?

The following code works in Sitecore 8.2 but not in Sitecore 9: var provider = LinkManager.Provider; The Provider property is not available anymore in Sitecore 9 Sitecore.Kernel, what should I use ...
1
vote
1answer
60 views

Error while saving SXA page from Experience Editor [closed]

I am trying to save the page after doing edits in SXA page from Experience editor and getting below error every time. This is occuring only for this page. In network tab, the response for ...
4
votes
1answer
260 views

Sitecore 9 in Azure PaaS : Add Application Insights SDK

For Sitecore 9 on Azure PaaS and newer versions, what is the best practice to Add and configure the Application Insights SDK in Visual Studio to generate some telemetry in Visual Studio. As we are ...
7
votes
1answer
109 views

Is there a method in Sitecore's utilities to format a numerical file size in a friendly way?

The title pretty much says it all. I feel like I've come across a method in the past that does something like: long fileSize = 524288000; string prettyFileSize = Sitecore.SomeUtility....
0
votes
1answer
75 views

Unable to fetch item using getitem method

I was trying to access item using getitem method from SOAP service. Sitecore.Data.Items.Item item = Sitecore.context.Database.GetItem(<ID>) But Item is null. I tried to fetch using Id and path ...
0
votes
0answers
141 views

Programmatically move items from web to master database?

I have a utility page that creates Sitecore items from a csv file. This utility page is used to import thousands of items at a time, which are used for interactive map data. The items are stored in ...
1
vote
1answer
48 views

Get prefetch cache created status

Is there any way to understand the status of prefecth cache ? What i want to understand is that if the prefetch is already created or not ? When i disassemble the sitecore.kernal , I see a property ...
0
votes
1answer
168 views

User Profile table in SQL

I am saving a user profile and one of the field is "UserLanguage" which is saving fine Context.User.Profile.Save(); The save method is working as expected but where the User Profile being saved in ...
2
votes
1answer
37 views

Fetching Final renderings in an .aspx page

I am creating a script to fetch rendering parameters of a sublayout and edit data template item field data based on the values of fields of rendering parameters. I was able to fetch renderings in ....
0
votes
1answer
53 views

WFFM custom toggle switch [closed]

I am adding toggle switch as a custom field. Toggle.cs (Toggle C# code) public class Toggle: Sitecore.Form.Web.UI.Controls.Checkbox { } public class ToggleField : Sitecore.Forms.Mvc....