Latest in FAQs
Please navigate to the file \CMSWebParts\Viewers\Basic\UniPager.ascx.cs. Please change the line:
pagerElem.PageSize = PageSize;
for the following code:
if (CheckBox1.Checked)
{
pagerElem.PageSize = 1000;
pagerElem.PagedControl.PagerForceNumberOfResults = 1000;
pagerElem.PagedControl.ReBind();
pagerElem.DataBind();
}
else {
pagerElem.PageSize = PageSize;
}
Now add this method to the file:
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
SetupControl();
}
The last thing to do is to alter the file CMSWebParts\Viewers\Basic\UniPager.ascx and add the code below:
<asp:CheckBox ID="CheckBox1" runat="server"
oncheckedchanged="CheckBox1_CheckedChanged" AutoPostBack="true" EnableViewState="true"/>
Now you’ve added a checkbox which, when checked, will display 1000 results instead of the number set in the properties of the UniPager web part.
-bp-
Please make sure you have the Data Visualization Charting component installed (please use the correct .NET version):
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14422
Additionally, please check the
<httpHandlers> section in the web.config file if it contains a similar entry to the one below:
<add path="ChartImg.axd" verb="*" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
-bp-
A bit of customization is required to track all the downloaded files. The problem is that only
CMS.File document type downloads are tracked by default. However, you can change that by going to the file:
\CMSPages\GetFile.aspx.cs
Within this file, around line 451 there is the following condition:
if (IsLiveSite && (file.FileNode != null) && (file.FileNode.NodeClassName.ToLower() == "cms.file"))
You have to alter it to the following one so all files are logged, not only files attached to a CMS.File document:
if (IsLiveSite && (file.FileNode != null) )
You can also add only your document type, it's up to you:
if (IsLiveSite && (file.FileNode != null) && ((file.FileNode.NodeClassName.ToLower() == "cms.file")) II (file.FileNode.NodeClassName.ToLower() == "custom.documenttype")))
-bp-
When you’ve installed Windows 7 and all the appropriate IIS features, WCF (formerly known as ADO.NET Data Services) will still not be available on your box by default.
You can enable it if you open up the command prompt in the Administrator mode and run the following command:
c:\>"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r
This will map the svc file type to aspnet_isapi.dll and make IIS recognize WCF services and startup the ServiceHost for you. In other words: the svc MIME type will be registered with IIS. The parameter on the end is:
-r: Re-registers this version of WCF and updates scriptmaps at the IIS metabase root and for all scriptmaps under the root. Existing scriptmaps are upgraded to this version regardless of the original versions.
And just to be sure: restart the IIS after you’ve run this command.
You can find more information here:
Configure WCF to run on Windows 7
WCF services may be used with Kentico CMS for example like:
Data communication - ADO.NET Data Services
-hg-
You will need to edit the ~\CMSPages\GetFile.aspx file and add your Google analytics code to this file. You should receive JavaScript code with your account number from Google. Place this code into the GetFile.aspx file under the first line of code. Please see the example below:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetFile.aspx.cs" Inherits="CMSPages_GetFile" %>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '<YOUR ACCOUNT HERE>']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
To set SSL for the logon.aspx page, please go to your solution in Visual Studio and open CMSPages/logon.aspx and its code-behind file.
Now write the following code in the Page_Load method:
if (HttpContext.Current.Request.Url.AbsoluteUri.ToLower().StartsWith("http://"))
{
Response.Redirect(HttpContext.Current.Request.Url.AbsoluteUri.Replace("http://", "https://"));
}
This error occurs when your resource files in folder '<web project>\CMSResources' are broken. To solve the issue, please try to replace these files with original files from the KenticoCMS installation directory, often located in Program Files.
Please go to Site Manager -> Settings -> <your site> -> Content Management and check the Personalize user interface by permissions check box. This allows you to specify permissions for the user interface. If you now go to CMS Desk -> Administration -> Permissions, choose Permission type: Modules and Permission matrix: CMS User Interface, you can uncheck the Properties tab for a particular role. This ensures that users in that role can't see the Properties tab.
Open the following file:
<web site folder>/CMSBlog/BlogCommentDetail.ascx.cs
Around line 70, add the following statement:
lnkName.Attributes.Add("rel", "nofollow");
This adds the rel=“nofollow“ attribute to the link to the name of author.
When you encounter a similar issue, the following action may help solve the problem:
Call:
aspnet_regiis.exe /iru
through the command prompt. You can find it in the folder:
* %windir%\Microsoft.NET\Framework\v4.0.30319
* %windir%\Microsoft.NET\Framework64\v4.0.30319 (64-bit machine)
Additional info can be found under the links below:
IIS.NET blogs
DevOneNode
-rm-
When you create a document based on your custom document type in CMSdesk -> Content (or other type than Page (menu) item), it inherits the page template from the parent document automatically. However, you may want to choose the page template manually.
To achieve this, you will need to define a special "new page" step. It can be the same as for the Page Menu Item document type. So please go to Site Manager -> Development -> Document types -> Edit -> General tab and define a New page property like this: ~/cmsdesk/Content/newpage.aspx.
The import of UI elements was changed in version 6.0. The unique identifier of each element is its GUID. It may happen that on a site created in one of the previous versions elements exist with the same element names as in version 6.0, but with different GUIDs than they should have in version 6.0. As a result, after importing the site to version 6.0, UI elements are duplicated and not displayed correctly in the UI.
To ensure this will not occur, you need to unify the UI elements on the older site (for example 5.5 R2) before perfoming its export and importing it to version 6.0.
You can do it easily if you apply
this script to the 5.5 R2 database.
-it-
The missing assembly reference is usually caused by the missing component
MSCharts. Please make sure you have it installed. Otherwise, please install it from
here.
-bp-
The easiest way is to create a new link to the pages in CMS Desk by defining a new UI element. In this example we will use the UI Cultures module as an example. At first, navigate to
CMSModules/UICultures in your project folder. Please find all the *.cs files in the subfolders and change the inheritance of the pages from
SiteManagerPage to
CMSModalPage. Now, create a new element in CMS Site Manager / Development / Modules / CMS Desk / User Interface. Here add a new element with the following properties:
Display name: UI Cultures
Code name: UICulturesCMSDesk
Parent element: CMS Desk
Elemet is custom: true
Caption: UI Cultures
Target URL: ~/CMSModules/UICultures/Pages/Development/UICultures_Default.aspx
Now, when accessing CMS Desk a new UI element should be available with the caption “UI Cultures”.
-bp-
It is a common issue on IIS 7 installations because the
Static Content option is not enabled by default. You need to check this Windows setting to apply stylesheets and display images which are parts of the application's static content. Please see this article:
Do not forget to check static content service for more information.
-it-
Regrettably, the
Attachment image gallery contains a lightbox and more than one lightboxes on one page do not work together. You can use
Document attachments web part instead of
Attachment image gallery if you need more attachment web parts on one page.
Version 6 include
Repeater with lightbox and
Attachments with lightbox which can work in several copies on one page.
-hg-
Even if you have enabled the YouTube video button in the forum WYSIWYG editor, the video is not shown in the forum post when a user fills all the necessary data for the Youtube video in the dialog and clicks OK.
The trick lies in the following setting which needs to be set on (either for the whole forum group or on a particular forum level):
Enable images in posts: Advanced dialog
You can find it in the
CMS Desk -> Tools -> Forums -> Edit -> General tab.
-ov-
If you want to view a SharePoint file using the handling file:
GetSharePointFile.aspx, please check the global settings in:
Site manager -> Settings -> Microsoft SharePoint
The settings configured here are automatically used for authentication by the
GetSharePointFile.aspx page. It is not enough to set up the credentials in the SharePoint web parts’ properties if you want to see the content of file (not to list only).
-hg-
This issue is related to 6.0 version of Kentico CMS. It may occur if you install Kentico into the same directory in the Program Files directory, by default it is:
C:\Program Files (x86)\KenticoCMS\6.0
In case you have a beta version already installed in this directory, the server error “CS0111: Type 'CMSModuleLoader' already defines a member called 'CMSModuleLoader' with the same parameter types” is thrown. To fix it you need to remove the previous installation or select a different installation folder.
-it-
We will demonstrate a behavior on the Paste button inside an editable text area.
If you right click on it, the Paste option is visible and Paste dialog is opened. You may need to change this default behavior and open dialog Paste as a plain text instead.
In this case can insert following line into the file:
~/CMSAdminControls/FCKeditor/editor/plugins/Shortcuts/fckplugin.js (or another registered script)
FCKCommands.LoadedCommands['Paste'] = new FCKPastePlainTextCommand();
Links to other resources:
Custom FCK editor toolbar
-it-