composite.news link not working

Topics: Standard packages
Sep 7, 2011 at 9:41 PM

Hi,

I added Composite.News package and it worked well on my localhost. After copying to my livesite (www.zme-steenwijk.nl) The link to the description etc is not working.

Situation:
I add a News item and publish it (Menu Nieuws or Activiteiten-Terugblik on my site)
it is visible in the list (Composite>News.Archive)
the link to the actual page with the descption does not work

Help!

gr Ronald

Sep 8, 2011 at 9:19 AM

Hello,

What version of Composite.News do you use? (System -> Packages->Installed packages-> locate package -> right click "Package Info" )

Are the localhost and live site identical? (Composite C1 version and Composite.News version?

Sep 8, 2011 at 10:48 AM
Hello Inna,
I'm using version 2.0.9 of Composite.News and yes both site are identical because I copied localhost to the live site

gr Ronald
Sep 8, 2011 at 2:25 PM

I can't reproduce this problem, could you please give more details, for example what the web server is used for livesite?

Make sure that the page Nieuws.aspx has Composite.News.Archive function in the content.

Sep 9, 2011 at 8:05 PM

Hello Inna,

The webserver is a VPS with Win Web Server 2008 R2 SP1

And the page has only a H1 and the function Composite.News.Archive with all defaults except the date. I made the date dddd d MMMM yyyy

ps sorry for the late reaction, but via e-mail gave an error

gr Ronald

Sep 9, 2011 at 8:42 PM

Hi,

Also I deleted all the content in my localhost website rootfolder and copied the entire contents of my internet website to this folder and still no luck.
The links for the items in the newsarchive page (terugblik) are not working online but they do at localhost.
Help I've no clue anymore and the website needs to be online official next week :(

any suggestions?

gr Ronald

Sep 12, 2011 at 7:40 AM

Hello,

Composite.News uses HttpContext.Current.Request.PathInfo to display news details and it looks like it can't  get this pathinfo from URL. 

I found the similar problem described here http://forums.asp.net/t/1695745.aspx/1 .

Make sure your site's App Pool is running in Integrated mode and check your web.config -> under section  <system.webServer> -> is there some handler mappings? (check this http://forums.asp.net/t/1695745.aspx/1 )

To make sure that it really can't get PathInfo, try this: locate XSTL function Composite.News.Archive -> edit -> Template tab -> at the bottom add this simple c# GetPathInfo() method 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:template match="/"> <html> <head> <style type="text/css"> .News .Date { font-size: 80%; } .News .Title { margin-top: 10px; font-weight: bold; } .News .Paging a { padding: 2px; } </style> </head> <body> .... </xsl:template> <xsl:template mode="NewsItem" match="*"> .... </xsl:template> <xsl:template mode="NewsDetails" match="*"> PathInfo = <xsl:value-of select="csharp:GetPathInfo()" xmlns:csharp="http://c1.composite.net/sample/csharp"/> ... </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:using namespace="System.Web" /> public string GetPathInfo() { return HttpContext.Current.Request.PathInfo; } </msxsl:script> </xsl:stylesheet>

Then browse your News details, f.e http://www.zme-steenwijk.nl/ZME-Netwerk/Nieuws.aspx/2011/09/10/online-nog-niet - the result should be PathInfo = /2011/09/10/online-nog-niet

Sep 14, 2011 at 2:06 PM

Hi Inna,

Thanks in advance for taking the time to help me! I am sorry for my late response, but I didn't have time till now. I tried your suggestion in the Composite.News.Archive xslt but still no luck. It displays the pathinfo on localserver but not on the webserver.
As for the handler I checked if the site is running in Intergrated mode and it does. The only handler mappings are the one's from Composite. So I have  no clu on what to do :(

gr Ronald

Sep 15, 2011 at 7:39 AM

Hello,

One more assumption, it you have access to the IIS web server, select  the Application pool of your site -> Advanced settings -> make sure that Enable 32-bit Applications set to True

Sep 15, 2011 at 9:20 AM
Edited Sep 15, 2011 at 9:32 AM

.

Sep 23, 2011 at 7:14 AM

Hello,

FYI: Try to use new version of the Composite.News module, it should be fixed now.

Oct 7, 2011 at 10:02 AM

Hi,

Inna thanks for the updated version of the Composite.News it's working now.

But... there seems to be a kind of cache  because if I click the page and immidiately a link to a news-topic  it doesn't work. Onnly after a while the links work
You can see this in action at http://www.zme-steenwijk.nl/ZME-Netwerk/Nieuws.aspx with FF 5.0 (it looks like about 10 seconds)

Thanks for the help of all

Oct 7, 2011 at 10:35 AM

Hello,

Yes it looks like a cache issue, and I remember that it was fixed on our newest C1 version but you can disable cache on your site and check out - locate file ~/Renderers/Page.aspx and remove this line:

<%@ OutputCache Duration="60" VaryByParam="*" VaryByCustom="C1Page" %>

Oct 7, 2011 at 10:40 AM

Hello Inna,

That was it. Thanks for all your help!

From: Inna [mailto:[email removed]]
Sent: vrijdag 7 oktober 2011 11:36
To: [email removed]
Subject: Re: composite.news link not working [CompositeC1:271822]

From: Inna

Hello,

Yes it looks like a cache issue, and I remember that it was fixed on our newest C1 version but you can disable cache on your site and check out - locate file ~/Renderers/Page.aspx and remove this line:

<%@ OutputCache Duration="60" VaryByParam="*" VaryByCustom="C1Page" %>