News and blog posts will not open (the old name of the topic is Unicode in URL)

Topics: General, Standard packages, Troubleshooting
Sep 20, 2011 at 3:13 PM

Hi,
I have a problem with packages that generate a URL from the title (Composite.Community.Blog; Composite.News). The title consists of the symbols of Cyrillic. Full url looks something like this (sorry for
Cyrillic):
http://192.168.201.3:8080/home/Info.aspx/2011/09/17/Пробная
but should look something like this:
http://192.168.201.3:8080/home/Info.aspx/2011/09/17/%D0%9F%D1%80%D0%BE%D0%B1%D0%BD%D0%B0%D1%8F
Page therefore can not be opened. How can I solve this problem?
Additional Information:
Freshly installed Composite C1
W2K8 R2 with IIS 7.5
Composite C1 2.1.1 (Build no. 2.1.4113.99)
Composite.Community.Blog - 1.6.6
Composite.News - 2.0.9
Contribution.CompositeC1Contrib.Core package not installed

Coordinator
Sep 21, 2011 at 8:38 AM

Hello,

The URL like this should work - http://192.168.201.3:8080/home/Info.aspx/2011/09/17/Пробная

Do the Blog or News work with English titles on your environment?

Sep 21, 2011 at 2:34 PM

Thanks for the reply,
News with English title does not open too.
I tried a clean install of Composite C1 v2.1.1 with HTML based Starter Site. Then I install news package, add "news page" page to the Frontpage web site. Then I create the news with the title in English and published it. And this news is not open.

Coordinator
Sep 22, 2011 at 7:34 AM
Edited Sep 22, 2011 at 7:38 AM

Hello,

These packages(News and Blog) use HttpContext.Current.Request.PathInfo to display items details and it looks like this PathInfo property doesn't work on  some environments.

Could you please, try this to make sure it really can't get PathInfo:

- locate XSTL function Composite.News.Archive -> edit -> Template tab -> at the bottom add this simple c# GetPathInfo1() and GetPathInfo2()  methods and check the result:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:in="http://www.composite.net/ns/transformation/input/1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:n="http://c1.composite.net/News" xmlns:df="#dateExtensions" xmlns:mp="#MarkupParserExtensions" exclude-result-prefixes="xsl in df n">
  <xsl:param name="items" select="/in:inputs/in:result[@name='GetNewsItemXml']/NewsItem" />
  <xsl:param name="pageId" select="/in:inputs/in:result[@name='GetPageId']" />
  <xsl:param name="pagingInfo" select="/in:inputs/in:result[@name='GetNewsItemXml']/PagingInfo" />
  <xsl:param name="showTeaser" select="/in:inputs/in:param[@name='ShowTeaser']" />
  <xsl:param name="showTeaserInDetails" select="/in:inputs/in:param[@name='ShowTeaserInDetails']" />
  <xsl:param name="dateFormat" select="/in:inputs/in:param[@name='DateFormat']" />
  <xsl:param name="isNewsList" select="n:IsNewsList()" />
  <xsl:template match="/">
    <html>
      <head>
       
        </style>
      </head>
      <body>
        <div class="News">
	  PathInfo1 =   <xsl:value-of select="csharp:GetPathInfo1()" xmlns:csharp="http://c1.composite.net/sample/csharp" />
          <br /> 
	  PathInfo2 =   <xsl:value-of select="csharp:GetPathInfo2()" xmlns:csharp="http://c1.composite.net/sample/csharp" />
 
         ...
        </div>
      </body>
    </html>
  </xsl:template>
  <xsl:template mode="NewsItem" match="*">
  ...
  </xsl:template>
  <xsl:template mode="NewsDetails" match="*">
  ...
  </xsl:template>
  <xsl:template match="PagingInfo">
   ...
  </xsl:template>
  <msxsl:script implements-prefix="csharp" language="C#" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:csharp="http://c1.composite.net/sample/csharp">
    <msxsl:assembly name="System.Web" />
    <msxsl:assembly name="Composite" />
    <msxsl:using namespace="System.Web" />
    <msxsl:using namespace="Composite.Core" />
	  public string GetPathInfo1() { 
	  
	  return HttpContext.Current.Request.PathInfo; 
	  
	  } 
	  public string GetPathInfo2() { 
	  
	  return new UrlBuilder(HttpContext.Current.Request.RawUrl).PathInfo;
	  
	  }
  </msxsl:script>
</xsl:stylesheet>


Sep 22, 2011 at 1:31 PM

Thanks for reply,

I tried to change the XSLT function. Now on the news page shows this:
PathInfo1 =
PathInfo2 =

Sep 22, 2011 at 1:39 PM

could be interesting to see what the value of HttpContext.Current.Request.RawUrl is

Coordinator
Sep 22, 2011 at 1:42 PM
Edited Sep 22, 2011 at 1:43 PM
vSoul wrote:

Thanks for reply,

I tried to change the XSLT function. Now on the news page shows this:
PathInfo1 =
PathInfo2 =

The News page show this when you click on the News details link?

Sep 22, 2011 at 2:21 PM
Inna wrote:
vSoul wrote:

Thanks for reply,

I tried to change the XSLT function. Now on the news page shows this:
PathInfo1 =
PathInfo2 =

The News page show this when you click on the News details link page?

No, the text is displayed when I go to a page with Composite.News.Archive function  (http://192.168.201.3:8081/Home/News.aspx).
Page with Composite.News.Latest function (http://192.168.201.3:8081/Home/News-Latest.aspx) displays a list of news.
when I click on one of the news on a page, a page with Composite.News.Archive function (http://192.168.201.3:8081/Home/News.aspx/2011/09/22/News-2) opens and displays following:
PathInfo1 =
PathInfo2 = / 2011/09/22/News-2

Coordinator
Sep 22, 2011 at 3:01 PM

We will review these packages and fix GetPathInfo methods. I will write you as soon as fix will be available.

Sep 22, 2011 at 3:02 PM
burningice wrote:

could be interesting to see what the value of HttpContext.Current.Request.RawUrl is

Hi,

How can I see this?

Sep 22, 2011 at 3:03 PM
Inna wrote:

We will review these packages and fix GetPathInfo methods. I will write you as soon as fix will be available.

Thank you.

Coordinator
Sep 22, 2011 at 4:22 PM

Could you please check out News module with new Composite.News.dll

Download this dll from here http://packagesdemo.c1.composite.net/uploads/Composite.News.zip , unzip and put Composite.News.dll to the bin folder of your site (replace existent dll)

Thanks.

Sep 22, 2011 at 5:28 PM
Inna wrote:

Could you please check out News module with new Composite.News.dll

Download this dll from here http://packagesdemo.c1.composite.net/uploads/Composite.News.zip , unzip and put Composite.News.dll to the bin folder of your site (replace existent dll)

Thanks.

After replacing the library news open normally, including the title with Cyrillic characters.

Can I use this library in production environment or wait for official release?

Coordinator
Sep 22, 2011 at 5:44 PM

>> Can I use this library in production environment or wait for official release?

Yes you can. Also I will inform you, when Blog package will be fixed.

Coordinator
Sep 23, 2011 at 7:13 AM

Hello,

You can try new versions of the Composite News and Blog modules.

Sep 23, 2011 at 11:26 AM
Inna wrote:

Hello,

You can try new versions of the Composite News and Blog modules.

Hello, Inna.
Thanks for your help. Quickly and professionally. Where I can click a +1 =)?
I have another question. How can I upgrade the package without first removing it? Removing a package affects the existing data, how to avoid this?

Coordinator
Sep 23, 2011 at 12:02 PM

In this case you can just replace DLLs in Bin folder.

Generally, the packages' change sets are available here - http://c1packages.codeplex.com/SourceControl/list/changesets where you can see what was changed in package.

My changeset is not available yet for some reasons, so for now you can download these DLLs from here: http://packagesdemo.c1.composite.net/uploads/Composite.News.zip   and http://packagesdemo.c1.composite.net/uploads/Composite.Community.Blog.zip  

Sep 23, 2011 at 12:20 PM

Thank you, after replacing the libraries it works.

Oct 9, 2011 at 7:08 PM

Hi. I have the same problem. I have Composite C1 2.1.1 Build no. 2.1.4113.99 and Composite.News 2.1.2 installed. When I try to open news link its not work and I cant see whole news text.

Thanks                  

Coordinator
Oct 10, 2011 at 9:36 AM

Hello,

The version Composite.News 2.1.2 should work with Composite C1 2.1.1. I retested. The only known issue that it doesn't work with CompositeC1Contrib NicerUrls feature. Do you use this feature?

Oct 10, 2011 at 11:28 AM

No, I am not using this.

Coordinator
Oct 11, 2011 at 8:43 AM
Edited Oct 11, 2011 at 8:44 AM

Is your site running in integrated mode? Please provide with other details: OS, Web Server?

Oct 11, 2011 at 11:57 AM

OS: WinXP SP3;

Web Server: IIS Express.

I am launch my site through MS WebMatrix.

Coordinator
Oct 11, 2011 at 4:15 PM

Could you, please, also try this test case from this post  and show the results.

Oct 11, 2011 at 7:13 PM

It's my link to current news: http://localhost:59158/news/2011/10/11/новость1

And that's I have got:

PathInfo1 = /2011/10/11/%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D1%8C1
PathInfo2 =

%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D1%8C1 it's новость1

Coordinator
Oct 12, 2011 at 7:16 AM

You wrote that you use C1 2.1.1 version and don't use CompositeC1Contrib NicerUrls feature, but how you have the news URL in this nice format - http://localhost:59158/news/2011/10/11/новость1 ? without .aspx extention?

If you use the C1 2.1.1 , the news URL should be like this http://localhost:59158/home/news.aspx/2011/10/11/новость1

Feb 23, 2012 at 12:46 PM

I have the same problem. Composite C1 3.1.4400.42718 and Composite.News 2.1.2; my site is master-page based. In Windows Vista even in W2008R2 with IIS 7.5 don't work links from news title to full description. For example: link URL is http://localhost/News/2012/02/22/test (description is 'test') and error 404 writes URL http://localhost:80/News/2012/02/22/test? and physical path C:\LocalData\C1test\test1\Website\News\2012\02\22\test.

Feb 23, 2012 at 12:54 PM

does it work if you request the url like this (Capitalized the word test)?

http://localhost/News/2012/02/22/Test

Feb 23, 2012 at 1:09 PM

No. Note that title is really lowercase 'test'. I tried more titles and case-games... no success.

Feb 23, 2012 at 1:30 PM

bugger! the only obvious answer i could think of, since there has been many issues regarding casing with news articles and blog posts.

Since i'm the one making the master-pages implementation it would be nice to find out if your problem is caused by that, or something else. Would you be able to zip me a copy of your website?

Feb 24, 2012 at 1:12 PM

Hi... so i looked in to it a bit, and with some help from Composite team who made the Newspackage, it turns out that the function on your news-page should be Composite.News.Archive instead of Composite.News.Latest. When i replaced the function everything worked as expected with Masterpages.

The Latest function is supposed to be used on ie. your frontpage to show a small teaser-list that then points to the actual page that has the Archive function.

Feb 27, 2012 at 1:15 PM

Thx, it works. Wish I read better the documentation.