Composite.News package

Topics: Standard packages
Jun 8, 2011 at 3:36 PM

Hello

Composite.News package related,  I can see the title, date, and teaser of news but I cannot see the whole news article when click the news title. (Description does not show up)

Any idea to solve this?

Thanks

Maydin

Jun 13, 2011 at 4:08 PM

i cannot access the whole news article through its title link from latest news or archived news page.

Anyone to help me?

Thanks in advance

Coordinator
Jun 14, 2011 at 6:52 AM

Hello,

I just tested Composite.News package and seems to be it works.

Could you please provide with more details how to reproduce:

- C1 version

- do you use CompositeC1Contrib NicerUrls feature?

- In what language your news?

Jun 14, 2011 at 2:37 PM

Hello Inna,

The version is: Composite C1 2.1.1   Build no. 2.1.4113.99   

Yes, I use CompositeC1Contrib NicerUrls.  ( I also did fresh installation of html starter site and news package it did not make any difference [ NO Contrib NicerUrls feature ] )

News is in English. 

Thanks

Coordinator
Jun 15, 2011 at 7:15 AM

Hi,

I retested and Composite.News  works on Composite C1 2.1.1   Build no. 2.1.4113.99   without CompositeC1Contrib NicerUrls. Please, note that the page with attached News datafolder should include Composite.News.Archive function as only this function shows all the news (archive) or the details of a selected news item.

Composite.News  + CompositeC1Contrib NicerUrls doesn't work  - see the last comment on  this discussion http://compositec1contrib.codeplex.com/discussions/255920

You can download Composite.News source code from http://c1packages.codeplex.com/   and modify it to work with Nicer URLs.

 

Jun 15, 2011 at 4:52 PM

Hi Inna

I cannot download the Composite.News source code from Composite C1 packages page. Anyother way to get it?

thanks

Coordinator
Jun 16, 2011 at 6:11 AM

On this page http://c1packages.codeplex.com/SourceControl/list/changesets on the right side there is  a link Download -  Did you try this link?

Jun 16, 2011 at 6:50 PM

Hi Inna,

I got the source code thanks for that.

How about some instructions /code for making Composite.News  + CompositeC1Contrib NicerUrls work in C1 for non programmer C1 users, developers.

i am really clueless about making these 2 packages work together.  Please help me!

Regards

Maydin

Jun 16, 2011 at 7:50 PM
Edited Jun 23, 2011 at 3:14 PM

i agree that the stock news package should be changed so it doesn't rely on RawUrl but respond positively to rewrites. Accessing PathInto or Querystring instead doesn't break when the original url is being rewritten, and will work the same way as usual when the url is not rewritten.

Jun 23, 2011 at 3:08 PM

Hello Inna

Any instructions /code for Composite.News and NicerUrls packages work together. 

Thanks

Coordinator
Jun 29, 2011 at 8:47 AM

@maydin Try using replacing /Bin/Composite.News.dll with this dll http://docs.composite.net/downloads/temp/napernik/Composite.News.dll

It should help (according to @burningice, I haven't tested it)

Jun 29, 2011 at 9:01 AM

Don't put it all on me, i haven't even seen the code that is in the dll being linked to... ;) The steps to make it work are described here http://compositec1contrib.codeplex.com/discussions/255920 so if HttpContext.Request.PathInfo is accessed instead of parsing the RawUrl it should work flawlessly, both with and without extensions.

Jun 30, 2011 at 7:55 PM

Hello @napernik and @burningice

I have tested the new Composite.News.dll on a fresh intallation with CompositeC1Contrib version 1.0.6 

when News title has (one or more) upper case letters in it, does not work,  if title made of all lower case letters then works ( i mean i can see the news details)

RSS news Feeds links do not work either (in any case)

Regards

 

Jun 30, 2011 at 7:56 PM

can you post here what the links looks like, the ones that works and the ones that don't...

Jun 30, 2011 at 8:24 PM

Not working
http://localhost/R-and-D-News/2011/06/30/first-r-and-d-news      News Tittle: First R and D News

Working links
http://localhost/R-and-D-News/2011/06/30/second-news-             News tittle: second news

http://localhost/R-and-D-News/2011/06/30/news-6                       News title: news 6

non working Rss links
http://localhost/Home/R-and-D-News.aspx/2011/06/30/news-6

http://localhost/Home/R-and-D-News.aspx/2011/06/30/second-news-

http://localhost/Home/R-and-D-News.aspx/2011/06/30/First-R-and-D-News

Jun 30, 2011 at 8:37 PM

About the link that doesn't work, http://localhost/R-and-D-News/2011/06/30/first-r-and-d-news, can you try to change it in your address browser to http://localhost/R-and-D-News/2011/06/30/First-R-and-D-News and see if it helps. Looking at the source http://c1packages.codeplex.com/SourceControl/changeset/view/8053#129097, it looks like that the title lookup is case sensetive... clearly a bug if thats the case.

Regarding rss link, this is because the filter that rewrites urls in text is only applied for pages, not basic httphandlers, which is what generates the feed. If you're able to compile code yourself you can change this in UrlFilterModule.cs http://compositec1contrib.codeplex.com/SourceControl/changeset/view/68173#1133184 where you'll find this method

protected virtual bool ShouldRewriteUrls(HttpContext ctx)
{
    return ctx.Handler is Page && !ctx.Request.Url.LocalPath.StartsWith(C1UrlUtils.AdminRootPath);
}
Here yoiu can change the check on the handler to IHttpHandler instead of Page or omit it all togeter.

Jun 30, 2011 at 8:57 PM

Hi burningice

http://localhost/R-and-D-News/2011/06/30/First-R-and-D-News  is working

hopefully, I will try rss link related changes this evening and let you know the result

Thank you very much

 

Jun 30, 2011 at 9:24 PM

i've created a issue for the case sensetive urls here http://c1packages.codeplex.com/workitem/767

Jun 30, 2011 at 9:27 PM

Regarding the ShouldRewriteUrls its intentinally marked as protected, so you can subclass the whole UrlFilterModule class and just override ShouldRewriteUrls, and register your new class instead in web.config. This way you'll keep your specific functionality even when the package is upgraded. 

Coordinator
Jul 1, 2011 at 12:48 PM

@maydin I'm going to publish upgrade steps to a beta version next week. Never version provides friendly urls without Contrib project and works well with News * Blog modules.

Coordinator
Jul 7, 2011 at 10:43 AM

Upgrade steps to the latest build http://compositec1.codeplex.com/discussions/264105

Jul 7, 2011 at 2:35 PM

Thanks alot @napernik