Kentico 10: Using custom web controls tapping into the Kentico API.Reference: https://docs.kentico.com/api10/e-commerce/customers#Customers-CreatingaregisteredcustomerIf a user decides to create a customer account during the checkout process, how do I get the customer to a page to set their user password.
Thinking about generating a url via api for the user to reset their password. Is there an api for generating that reset url?Is there a better way?Thanks David
↧
Prompt E-Commerce customer to set password when they decide to register as user
↧
Add Custom CSS in your Website
I have added a custom css in my website and i notice that it overrides the cms' default css. To be specific my custom css overrides the padding of the workflow menu buttons. What is the best way to add your custom css in your website without affecting the default css of kentico? Thanks,
Gelli
↧
↧
getting codenames as titles
Hi guys , i'm getting codenames as titles.please help me where i did wrong
↧
Kentico Smart Search Button with Font Awesome icon
Im very new to kentico development wise and I'm trying to work to a design given to me.I'm currently trying to tie up the smart search web part to show as a text input with a font awesome search icon as the button (with no button text). Is there any easy way to do this? Or should I resort to making a copy of the Smart search control and extending it out?The html designed has just @button type="submit"@@i class="fa fa-search"@@/i@@/button@
is there an easy way to put this into a new layout for Smart search?Thank you Andrew
↧
Smart Search Button with Font Awesome icon
Hi,Im very new to kentico development wise and I'm trying to work to a design given to me.I'm currently trying to tie up the smart search web part to show as a text input with a font awesome search icon as the button (with no button text). Is there any easy way to do this? Or should I resort to making a copy of the Smart search control and extending it out?The html designed has just@button type=@submit@@@i class=@fa fa-search@@@/i@@/button@
is there an easy way to put this into a new layout for Smart search?Thank you
Andrew
↧
↧
Exception while browsing webpart/widget properties
There is an exception in admin panel while browsing webpart or widget properties in certain order.
Have a look at this video:kentico admin panel exceptionFollowing exact pattern produces the error. Moving through properties in different order does not break anything. Web part properties are using only kentico form controls. No custom code is present on the fields page. There are properties that use Url Selector, boolean and textboxes. Kentico version is 11.0.6Renaming categories does not helpRemoving categories DOES helpIf there is category between fields that have Rich Text Editor and Url Selector it breaksThis is from event log:Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Exception type: System.Web.HttpUnhandledException
Stack trace:
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.cmsmodules_admincontrols_pages_uipage_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\2662bd87\eda15a9c\App_Web_uipage.aspx.71dc965c.cvpcugfd.0.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean@ completedSynchronously)
Message: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
Exception type: System.Web.HttpException
Stack trace:
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at CMS.FormEngine.Web.UI.DivDefaultLayout.CreateField(FieldCreationArgs args)
at CMS.FormEngine.Web.UI.AbstractDefaultLayout.CreateCategory(List`1 formFields, FieldCreationArgs args)
at CMS.FormEngine.Web.UI.DivDefaultLayout.CreateCategory(List`1 formFields, FieldCreationArgs args)
at CMS.FormEngine.Web.UI.AbstractDefaultLayout.Load()
at CMS.FormEngine.Web.UI.DivDefaultLayout.Load()
at CMS.FormEngine.Web.UI.AbstractDefaultLayout.LoadLayout()
at CMS.FormEngine.Web.UI.BasicForm.LoadDefaultLayout()
at CMS.FormEngine.Web.UI.BasicForm.LoadData(IDataContainer data)
at CMS.FormEngine.Web.UI.BasicForm.ReloadData()
at CMSModules_AdminControls_Controls_Class_FieldEditor_ControlSettings.Reload(Boolean forceReloadCategories) in C:\dev\BlueRhino-2018\server\CMS\CMSModules\AdminControls\Controls\Class\FieldEditor\ControlSettings.ascx.cs:line 264
at CMSModules_AdminControls_Controls_Class_FieldEditor_FieldEditor.LoadControlSettings(String selectedFieldType) in C:\dev\BlueRhino-2018\server\CMS\CMSModules\AdminControls\Controls\Class\FieldEditor\FieldEditor.ascx.cs:line 3937
at CMSModules_AdminControls_Controls_Class_FieldEditor_FieldEditor.OnLoad(EventArgs e) in C:\dev\BlueRhino-2018\server\CMS\CMSModules\AdminControls\Controls\Class\FieldEditor\FieldEditor.ascx.cs:line 913
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
↧
Kentico custom email provider - prevent email from being sent
working on custom email provider where in certain situation I prevent email from being sent out.note: all email currently being sent out via Kentico email queue and needs to stay that way.All options I tried to delete/archive/stop sending email all result in the email staying in Kentioc email queue with status sending or waiting.This is the code I am trying, see option in "if (stopEmail){..}" protected override void SendEmailAsyncInternal(string siteName, MailMessage message, SMTPServerInfo smtpServer, EmailToken emailToken)
{
string contentAll = "";
bool stopEmail = false;
// read email content
try
{
if (message.AlternateViews.Count @ 0)
{
for (int i = 0; i @ message.AlternateViews.Count; i++)
{
var stream = message.AlternateViews[i].ContentStream;
if (stream.CanRead)
{
using (StreamReader reader = new StreamReader(stream, System.Text.Encoding.UTF8, false, 1000, true))
{
contentAll += reader.ReadToEnd();
}
}
}
}
}
catch (Exception ex)
{
EventLogProvider.LogInformation("CMSCustom baned emails", "EMAIL SENDOUT", ex.Message + ", @br /@ email content:@br /@ " + contentAll);
}
// check if BANNED dmoains are in email
string bannedEmails = "@somedomain.com";
if (contentAll.Contains(bannedEmails))
{
stopEmail = true;
}
// if banned email found, stop email from being sent
if (stopEmail)
{
//
var m = new EmailMessage(message);
var mi = EmailInfoProvider.SetEmailInfo(m, SiteContext.CurrentSiteID);
//opt 4 - Stuck in email queue - sending/waiting
//SmtpClient client = new SmtpClient(smtpServer.ServerName);
//client.SendAsyncCancel();
// opt 3 - Stuck in email queue - sending/waiting
//EmailHelper.Queue.CancelSending();
// opt 2 - Stuck in email queue - sending/waiting
// EmailHelper.Queue.Delete(mi.EmailID);
//opt 1 - Stuck in email queue - sending/waiting
//mi.EmailStatus = EmailStatusEnum.Archived;
//mi.Update();
return;
}
base.SendEmailAsyncInternal(siteName, message, smtpServer, emailToken);
}
Any idea how I can successfully remove/delete get rid on the specific email?Thanks ):
↧
How to add label in marker in static google map
hi all,i am using static google map and i am getting all the markers for my lati and langi, what i am having trouble is not getting the lebel near markers.Please help
↧
i want to redirect to different page on clicking on markers in google map
i want to redirect to different page on clicking on markers in google map.
i have a field url in my pagetype how can i acces that on clicking of that perticular marker.
↧
↧
Displaying alternative form of module class on website
Hello I’m looking for a way to display alternative form of class [x] on a page.Is there a default web part like “custom registration” or something else what can be used?Kind regardsStefan
↧
Problem running smart searches in MVC
I am having trouble getting a smart search's results to display in an MVC site, probably because the index itself is not created, but searched for in the MVC application. I have a running MVC application, and now I followed the steps described based on the learning application to add smart search to my site. I create an index and checked with preview mode that it does indeed work. Then I installed the integration package on my MVC site. When I ask the SearchIndexInfoProvider, it can find the index in question, but it does not match anything. I inspected the SearchIndexInfo to find that CurrentIndexPath is set to a location beneath my MVCproject, which however does not contain a SmartSearch subfolder.
From here on I figured that either the issue might be with web farm configuration, but I cannot find good information on how the configuration is supposed to look with MVC, only that it is supposed to be automatic. Or it might be problems with access rights of the web server to the App_Data folder. My web farm app shows me only one farm server, which is named after my computer (which hosts Kentico 11 and the MCV application on ISS Express on two different ports.). This seems wrong, as I expect there should be 2 web farm servers, as indicated in the @licensing for MVC applications@ scenarios documentation page.Access rights of the web server to the App_Data folder could also be a problem, because the project is located on a different logical drive, but I do not see any errors in the event log that would indicate issues, the website is running fine otherwise.How could I investigate further?
↧
Create UI to manage many to many relationship between classes in custom module in Kentico
I'm attempting to store and manage some relational data within Kentico's (Kentico 10) database. I'm having trouble fitting this into Kentico's best practices.I have the following data:
1. Company - a list of companies
2. PostalCode - a list of international postal codes, their country and their lat/long
3. CompanyPostalCodes - many to many table of postal codes served by each company AND a Boolean flag that describes how the company serves that postal code (The postal codes are service / delivery areas) I've read the documentation on creating custom modules
and have successfully created a module, classes and UI to manage companies and postal codes.
I've also read through documentation on creating a binding class
and have created one. (I've added the aforementioned Boolean field there too.) I am stuck at trying to create a UI to manage the many to many relationship between them. Ideally, I would have a way to select multiple postal codes (and key in postal codes that do not yet exist in the PostalCode table) from the Edit Company page. I would also need to be able to set the flag field for each postal code on a given company's edit page. (If this is overly complicated, I could have a tab for postal codes with the flag and another tab for those without.) But I am open to any suggestion on how to manage the relationship in the UI.Any suggestions?
↧
Filter in google map
Hi all,I have a dynamic map which associate with a page data source.and my map is working fine.
Now i want to implement filter on my map, in my page type i have a field called typeoflocation which consist either @Sales@ or @@Service@ so i want to give option of @Sale@ for sale @Service@ for service and @All@ for both in my map.so please guide me how how could i implement the above.
↧
↧
Document alias is in collision with other document alias or document URL path
I have a page in Kentico 7 with a URL of:/{location}/Our-Services/{service}I changed it to:/Our-Services/{service}... but now I would like to add a document alias so the old URL redirects to the new one. When I do, I get the following message:@Document alias is in collision with other document alias or document URL path@I don't understand how that is possible being that I just removed that URL from this very document. Can anyone help me understand this and/or a way around it? Thanks!
↧
How to Settings - URLs and SEO
Dear Everyone,
I need help from everyone
- Url not friendly: demo.com/đieu-đo-đung-cho-tuong-lai.aspx
- Url friendly: demo.com/dieu-do-dung-cho-tuong-lai.aspx
1)I want to put the replacement replacement lists to optimize link url
Get Character replacements list:
á|a, à|a, ả|a, ã|a, ạ|a, â|a, ấ|a, ầ|a, ẩ|a, ẫ|a, ậ|a, ă|a, ắ|a, ằ|a, ẳ|a, ẵ|a, ặ|a, đ|d, é|e, è|e, ẻ|e, ẽ|e, ẹ|e, ê|e, ế|e, ề|e, ể|e, ễ|e, ệ|e, í|i, ì|i, ỉ|i, ĩ|i, ị|i, ó|o, ò|o, ỏ|o, õ|o, ọ|o, ô|o, ố|o, ồ|o, ổ|o, ỗ|o, ộ|o, ơ|o, ớ|o, ờ|o, ở|o, ỡ|o, ợ|o, ú|u, ù|u, ủ|u, ũ|u, ụ|u, ư|u, ứ|u, ừ|u, ử|u, ữ|u, ự|u, ý|y, ỳ|y, ỷ|y, ỹ|y, ỵ|y, Á|A, À|A, Ả|A, Ã|A, Ạ|A, Â|A, Ấ|A, Ầ|A, Ẩ|A, Ẫ|A, Ậ|A, Ă|A, Ắ|A, Ằ|A, Ẳ|A, Ẵ|A, Ặ|A, Đ|D, É|E, È|E, Ẻ|E, Ẽ|E, Ẹ|E, Ê|E, Ế|E, Ề|E, Ể|E, Ễ|E, Ệ|E, Í|I, Ì|I, Ỉ|I, Ĩ|I, Ị|I, Ó|O, Ò|O, Ỏ|O, Õ|O, Ọ|O, Ô|O, Ố|O, Ồ|O, Ổ|O, Ỗ|O, Ộ|O, Ơ|O, Ớ|O, Ờ|O, Ở|O, Ỡ|O, Ợ|O, Ú|U, Ù|U, Ủ|U, Ũ|U, Ụ|U, Ư|U, Ứ|U, Ừ|U, Ử|U, Ữ|U, Ự|U, Ý|Y, Ỳ|Y, Ỷ|Y, Ỹ|Y, Ỵ|Y
2) I want to convert the uppercase url into lowercase url
uppercase url: demo.com/Our-Solution.aspx to convert demo.com/our-solution.aspx
Thank you so much
↧
Kentico 10 export site ambiguous columns
I am trying to export a site in Kentico 10. During the export Pages section, a page template I created fails with the following error message.Message: Ambiguous column name 'City'.
Ambiguous column name 'State'.
Ambiguous column name 'PostalCode'.
These are pretty common fields. Do I need to do something special to my page type?
↧
Manual Upgrade
Hey AllThis appears to be a common thread but I'm asking the question afresh.Is there a procedure for easily upgrading the SQL DB only?We have a common situation where we are moving our installation to a new server and wish to upgrade from 8.1 to 9 to maintain support. This involves setting a up a new Version 9 installation and then connecting this to our existing 8.1 DB. We have run the update scripts for version 8.1 to 8.1 and 8.2 to 9.0 on the SQL db. We now get the all to familiar @Invalid column name 'DocumentInheritsStylesheet'@ error. I am fully aware this is due to the steps that need to occur after a normal in place upgrade to finalise the database.The question is how can we complete the above without having to go through the whole process of an in place upgrade from 8.1 to 8.2 then 8.2 to 9.0. on a production server without excessive downtime to our business? Is there a way to script the finalisation steps contained in @UpgradeProcedure.cs@ so that the fresh version 9 will accept the upgraded database? Can one manually run this file somehow?Cheers,
Brad
↧
↧
Assign from dropdown list default value
Hi,I have 2 drop down list. When selecting certain values on the first drop down the drop down list enables the second drop down list (I have not been able to find where it enables the second drop down list as I still new to Kentico, it is not using the visibility or enabled conditions.)Both list are have a @Select Value@ as default with a rule requiring that a value be chosen in the dropdown list and both are required.I tried to assign a default value to the second list based on the selected value on the first list.
{% (if (ContactReason.Value == @Test@){ @1@ } else { @Test this@ } %}
But the second list rule is still executed even when drop down list is not enabled. This prevent the form from being submitted.How can I change the selected value in the second list based on a value selected in the first list so that the rule in the second dropdown list is not preventing the page from being submitted.
↧
Content Staging: The incoming request has too many parameters.
We are using Content Staging and it works great except we are experiencing an error syncing an extended version of the Article page type.It appears to be generating a long query and ultimately the error is:
Caused exception: The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.Has anyone experienced this or have any suggestions how to resolve this?
Thanks in advance!The query it fails on is but there are 2100+ NodeAliasPath criteria listed in the query.SELECT [postidpath] FROM forums_forumpost
WHERE ( [postforumid] IN (
SELECT [forumid]
FROM forums_forum
WHERE ( [forumcommunitygroupid] IS NULL )
AND [forumdocumentid] IN
(SELECT [documentid]
FROM view_cms_tree_joined AS V WITH (nolock, noexpand)
LEFT OUTER JOIN com_sku AS S WITH (nolock)
ON [V].[nodeskuid] = [S].[skuid]
WHERE ( [nodealiaspath] LIKE @NodeAliasPath
OR [nodealiaspath] LIKE @NodeAliasPath1
OR [nodealiaspath] LIKE @NodeAliasPath2
....
OR [nodealiaspath] LIKE @NodeAliasPath8873
OR [nodealiaspath] LIKE @NodeAliasPath8874 )
)) )
↧
Implement full HTML page caching on CDN
We are trying to implement a full page html caching using CDN on our Kentico portal engine site. To be able to do this we need to set the cache-control of the documents and not only assets to "public". I've tried adding the code below in my global.asax begin request event to test it but for some reason the document response header cache-control is always set to no-cache. Did Kentico intentionally set it? I would think yes because they have its own caching mechanism built-in but if we want to use CDN we need to set the cache to public. Is there a way to override this?Response.Cache.SetCacheability(HttpCacheability.Public);
Response.Cache.SetMaxAge(new TimeSpan(1, 0, 0));
I also tried modifying the PortalTemplate.aspx.cs to add cache-control meta tag but it also did not work. tags.Text += "@meta http-equiv=\"cache-control\" content=\"public\" /@";
The response header is always
cache-control:no-cache, must-revalidate
content-encoding:deflate
content-type:text/html; charset=utf-8
date:Fri, 02 Mar 2018 18:38:03 GMT
expires:-1
pragma:no-cache
server:Microsoft-IIS/10.0
status:200
vary:Accept-Encoding
x-aspnet-version:4.0.30319
x-frame-options:SAMEORIGIN
x-powered-by:ASP.NET
↧