Technical support This forum is closed.
Version 1.x > Technical support > Just upgraded to 1.7 and... View modes: 
User avatar
Member
Member
janusz - 8/12/2005 5:33:06 PM
   
Just upgraded to 1.7 and...
First of all. Many thanks for new version! It is really good stuff and solves lots of issues.

Also I like the ASCX transformation very much.
Newsletter module great!
Versioning without check-in is really faster.
Default values for document templates - like that one too
Output filter - I am not really sure what is it. I have found in doc that it something for XHTML support but can we use it for other things as well?
I am still missing the possibility to put ascx files to other folder than project root :(

The upgrade was quite easy for my first project (that one without amendments to CMSDesk)

However, I have encoutered these problems so far>

1.
CMSDefaultAliasPath setting does not work. Till now I had a document with aliaspath=default in a project root. And this was my homepage. Now this file is not hit when I make request to website root. Also the path I put in CMSDefaultAliasPath is not used as well - so I do not have homepage now. How can I fix it?
(I have tried to disable outputfilter,basealiasurl but no behaviour changes)

2.
Custom edit, listing pages do not work. The problem is in BeginRequest in Global.asax. Where all files now except "special" files are urlrewritten. Because my custom pages are not in content tree then the url rewrite redirects the user to the website root. I have made quick fix by putting condition in BeginRequest that checks if the requested page is custom edit page.

Also, this problem applies to all aspx pages that are in my webproject folder - they are urlrewritten and therefore redirected to root.
(I have tried to disable outputfilter,basealiasurl but no behaviour changes)

3.
BaseAliasPath still does not work

I had the same issue in last versions. I have made a fix - not sure if correct one - but it works for me. Basically, I am removing the CMSWebSiteBaseAliasPath from GetUrlForAliasPath function. Without this code the cmsdesk does not want to display pages correctly.

'''<summary>Adds the postfix of the generated URLs according to the CMSFriendlyURLStyle web.config parameter value.</summary>
'''<param name="aliasPath">Alias path that should be (optionally) converted.</param>
Public Shared Function GetUrlForAliasPath(ByVal aliasPath As String) As String

'take out the basealiaspath if it is defined
If (ConfigurationSettings.AppSettings("CMSWebSiteBaseAliasPath") & "" <> "") Then
Dim baseAliasPath As String = ConfigurationSettings.AppSettings("CMSWebSiteBaseAliasPath")
aliasPath = aliasPath.TrimStart("/"c)
baseAliasPath = baseAliasPath.TrimStart("/"c)
If (aliasPath.StartsWith(baseAliasPath)) Then
aliasPath = aliasPath.Remove(0, baseAliasPath.Length)
End If
End If

If (Not ConfigurationSettings.AppSettings("CMSFriendlyURLStyle") Is Nothing) AndAlso ConfigurationSettings.AppSettings("CMSFriendlyURLStyle").Trim.ToLower <> "" Then
If aliasPath = "/" Or aliasPath = "~" Or aliasPath = "~/" Or aliasPath = "~/." Then
Return aliasPath
Else
Return aliasPath & ConfigurationSettings.AppSettings("CMSFriendlyURLStyle").Trim.ToLower
End If
Else
Return aliasPath
End If
End Function

User avatar
Member
Member
janusz - 8/12/2005 6:09:31 PM
   
Re: Just upgraded to 1.7 and...
I have another issue with the two options Edit / Published in the top right corner.

I have switched on the versioning but there is no difference between Edit / Published versions. I can see the new values in Edit mode and I can see the published version, but I cannot see the edited version as it could be published.

(I have <add key="CMSUseCheckinCheckout" value="false" />)

Janusz

User avatar
Guest
admin - 8/16/2005 9:01:48 AM
   
Re: Just upgraded to 1.7 and...
Hi Janusz,

Regarding the "latest version" option: this is no longer available in version 1.7 as it would not work correctly with latest changes we made (ASCX transformations, Editable Regions). It will be solved by the new staging module that will allow you to preview the whole web site before going live. Staging support will be available later this month, in version 1.7a.

Best Regards,

User avatar
Guest
admin - 8/16/2005 8:58:38 AM
   
Re: Just upgraded to 1.7 and...
Hi Janusz,

I'm sorry for the delay. Here are the answers:

- The output filter basically solves Microsoft bugs with postbacks and XHTML-non-compatibility of rendered code. With source code version, you can extend it with your own code, such as highlighting of special words, etc.
- We didn't manage to add the possibility of storing ascx files elsewhere in 1.7, we will try to add it in version 1.7a.

1. Could you please write me what value you use as CMSDefaultAliasPath and what the name of the page template for the /default document is?

2. This is a correct behavior - if you have some pages in the web project, outside the CMSDesk folder, they are rewritten. You can exclude them using the CMSExcludedDirectories
paremeter in the web.config.

3. Could you please write me what value you have in the CMSWebSiteBaseAliasPath parameter?

Thank you.

Best Regards,

User avatar
Member
Member
janusz - 8/16/2005 12:16:04 PM
   
Re: Just upgraded to 1.7 and...
<add key="CMSDefaultAliasPath" value="/default2" />
<add key="CMSWebSiteBaseAliasPath" value="/Addeva"/>
I have the default.aspx inside the root directory - which just displays the empty page.
I have a node with aliaspath /default2 in the CMS defined. The /default2 node is the MenuItem node with page template with filename -PageTemplates/ConsumerPageTemplate.aspx

I have tried to experiment:
- remove default.aspx
- change the CMSDefaultAliasPath to /Addeva/default2


2. OK. I have removed my fix and I am using CMSExcludedDirectories. Thanks!


User avatar
Guest
admin - 8/16/2005 1:12:43 PM
   
Re: Just upgraded to 1.7 and...
Hi Janusz,

could you please check what value you receive in the Request.Querystring["AliasPath"] parameter on the default home page (that one that does not display any content)? You can use Functions.GetAliasPath method to do that.

Why do you want to set the base alias path to /addeva? Do you plan to have several web sites in one database?

Thank you.

Best Regards,

User avatar
Member
Member
janusz - 8/16/2005 1:35:21 PM
   
Re: Just upgraded to 1.7 and...
I have put Request.Querystring["AliasPath"] on the page and if I hit the homepage the I get the exact value that I enter inside the CMSDefaultAliasPath

So e.g
/Addeva/default2

or
/default2

I have removed the code I have put inside the GetUrlForAliasPath and the rest of the site works. However, I can't make CMSExcludedDirectories to work. I do not know if this relates to the problem I have with the homepage. I have not inserted /PageTemplates/ directory to ExcludedDirectories and pagetemplates are not urlrewritten - so the site works. However, if I put test.aspx inside the /PageTemplates/test.aspx. I try to hit this page in browser then I get the page redirected to the /default.aspx and the aliaspath is the CMSDefaultAliasPath

If I put pagetemplates inside the CMSExcludedDirectories then it works the same :(
<add key="CMSExcludedDirectories " value="/PageTemplates" />

I have discovered that if I switch the CMSUseFriendlyURLs off then I can display the /PageTemplates/test.aspx



According to your base alias question...

The reason why I am using BaseAliasPath is that we have lots of directories with pages on Addeva. But also I have created several other folders in a tree that control different parts of the pages that we manage on Addeva - e.g folder with news, folder where you can define categories of pages, discussions, products etc.

So I can have all the pages on website in one folder and other "management" folders separately - so the users are not confused by the amount of nodes under the root.

User avatar
Member
Member
janusz - 8/16/2005 2:41:03 PM
   
Re: Just upgraded to 1.7 and...
Oh! I can't believe I have not seen this config -
I had a space after CMSExcludedDirectories so the web.config was not formatted well!. Now the CMSExcludedDirectories work :((

User avatar
Member
Member
janusz - 8/16/2005 2:44:03 PM
   
Re: Just upgraded to 1.7 and...
OK. So my last problem is only the CMSDefaultAliasPath :).

User avatar
Member
Member
janusz - 8/16/2005 3:15:47 PM
   
Re: Just upgraded to 1.7 and...
oh. and forgot about the Public Shared Function GetUrlForAliasPath(ByVal aliasPath As String) As String

If I remove my code (specified below) then the browsing in CMSDesk does not work. Its not big issue because I can keep this fix there - but it might be usefull for other users if they experience the same error.


'take out the basealiaspath if it is defined
If (ConfigurationSettings.AppSettings("CMSWebSiteBaseAliasPath") & "" <> "") Then
Dim baseAliasPath As String = ConfigurationSettings.AppSettings("CMSWebSiteBaseAliasPath")
aliasPath = aliasPath.TrimStart("/"c)
baseAliasPath = baseAliasPath.TrimStart("/"c)
If (aliasPath.StartsWith(baseAliasPath)) Then
aliasPath = aliasPath.Remove(0, baseAliasPath.Length)
End If
End If


User avatar
Member
Member
janusz - 8/16/2005 4:15:11 PM
   
Re: Just upgraded to 1.7 and...
Another issue with Base Alias Path - forgot to mention before.

I use the function Functions.GetCurrentPage on the template. This function errors when using the base alias path - the reason is this statement
CMSFunctions.GetPageInfoDR(CMSFunctions.GetAliasPath)

Function GetAliasPath gets the path with base alias path
then inside the GetPageInfoDR there is base alias path added again - and therefore the function does not work. Again, its not major - I have fixed it easily.

But now I am just making sure that these 2 fixes have no effect on the CMSDefaultAliasPath functionality.

Janusz

User avatar
Guest
admin - 8/18/2005 11:52:46 AM
   
Re: Just upgraded to 1.7 and...
Hi Janusz,

we will explore this during today and we will inform you how to solve these issues best.

Regards,

User avatar
Guest
admin - 8/18/2005 5:07:34 PM
   
Re: Just upgraded to 1.7 and...
Hi Janusz,

Thank for notifying us about this issue. I must admit that the CMSWebSiteBaseAliasPath parameter doesn't work really consistently in Kentico CMS 1.7.

In version 1.7a, we will make its functionality clear: the Request.Querystring["AliasPath"] value will contain the base alias path after URL rewriting automatically and it won't be necessary to treat it in some special way at many and many places any more.

We have just finished the changes and tested them with two web sites that run with one database, but as two separate web applications with different base alias path (/web1 and /web2) and everything seems to be working fine now.

Best Regards,