+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Customized news URL's stop working

Customized news URL's stop working

8 posts, 0 answered
  1. Marnix
    Marnix avatar
    5 posts
    Registered:
    09 Oct 2006
    27 Jan 2011
    Link to this post
    I have configured the news module to not use the publish date in the URL for news items.

    <cmsEngine defaultProvider="Generic_Content">
      <providers>
        ....
        <add name="News" urlRewriteFormat="[Title].aspx" urlDateTimeFormat="yy-MM-dd"
          urlWhitespaceChar="_" visible="False" defaultMetaField="Title" securityProviderName=""
          allowVersioning="True" applicationName="/News" versioningProviderName=""
          commentsModeration="true" connectionStringName="GenericContentConnection"
          type="Telerik.News.Data.DefaultNewsProvider, Telerik.News.Data"/>
        ....

    And

    <news defaultGenericProvider="News">
      <genericContentProviders>
        <add providerName="News" publicationDateField="Publication_Date"
          expirationDateField="Expiration_Date" thumbnailUrlField="Thumbnail"
          urlRewriteFormat="[Title].aspx" urlDateTimeFormat="yy-MM-dd"
          urlWhitespaceChar="_"/>
      </genericContentProviders>
    </news>

    This works well but stops working every now and again without any apparent reason. It looks like the news module falls back to it's default configuration with date in the URL.
    The result is that users get to see the 404 error page whenever they click a news link on the site.

    After manually recycling the app pool the problem is resolved, until it goes bad again some time later.

    Note that I'm also using URL rewriting with the CmsHttpModuleUrlRewrite handler. From the url of the 404 page I can see that rewriting is working correctly.

    Any clues as to what is going wrong here?

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    01 Feb 2011
    Link to this post
    Hello Marnix,

    Thank you for using our services.

    This issue is rather strange, and we have not experienced it so far. Can you please check if you have some other Sitefinity website connected to the same database which has the default url format settings?

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Marnix
    Marnix avatar
    5 posts
    Registered:
    09 Oct 2006
    01 Feb 2011
    Link to this post
    Hi,

    Yes, there is a seconds site connected to the same database and that news provider is using the default url format.
    This provider is however configured to use a different application name for it's news. It also runs in a separate app pool.

    Thanks,
    Marnix
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    05 Feb 2011
    Link to this post
    Hello Marnix,

    I have tested the provided configuration, however was not able to reproduce the issue. Can you please check if somewhere on your development environment there is still other projects connected to this database. Probably left out from an upgrade or something.

    Best wishes,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Marnix
    Marnix avatar
    5 posts
    Registered:
    09 Oct 2006
    22 Feb 2011
    Link to this post
    Hi Radoslav,

    I'm absolutely certain there are no projects in the development environment connected to this database. The production server is physically separated from the development environment.
    Could you maybe explain how a second site could affect the news module? I would expect that modules running in separate application pools would be completely agnostic of each other, even when sharing a database.

    Also note that the problem mostly occurs after a longer period of time. I haven't been able to narrow down exactly when the problem starts or what triggers it. There are no problems reported in the windows event log.

    Best,
    Marnix
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    28 Feb 2011
    Link to this post
    Hi Marnix,

    All websites which are connected to the same database should be running exactly the same Sitefinity versions. So for example if you are sharing news across multiple websites you should make sure that all of them are using the same version.

    When a Sitefinity website is started it checks the schema version of the database and matches it to the version of the Stiefinity assemblies. Then if there are differences the website will perform a database upgrade/downgrade to match the schema version and stored procedures. So for example you have two websties which pool news in the same database. When each website is restarted it will check the schema version for the news module and will see if there is a difference in the stored procedures and match them so that it can work with them.

    All the best,
    Radoslav Georgiev
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  7. Marnix
    Marnix avatar
    5 posts
    Registered:
    09 Oct 2006
    01 Mar 2011
    Link to this post
    Hi Radoslav,

    Thanks for the explanation. I'm certain that the sites connected to the database are running the exact same version of Sitefinity. I did a compare on the /bin folders of both sites and found no diffs.

    I did a little bit of digging around in the database and the Sitefinity assemblies (with .Net Reflector). If I understand correctly the mapping of url's to content is implemented through a database query on the sf_CmsContentBase table. 
    From your explanation I gather that the url's in the database are (re)generated when the site starts up. That is why two news modules that access the same data can interfere with each other, even if they live in different web sites. Right?

    Thanks,
    Marnix
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Mar 2011
    Link to this post
    Hi Marnix,

    Yes this is correct. However since your both websites are pulling content from the same database you should make sure that if you want to separate the content (for siteA, and for siteB) the news providers on the different websites should use different application name - e.g. /NewsSiteA, and /NewsSiteB. The default applciation name for news in /News. If both websites have different url formats for news, then they should use different news items, separated by the application name.

    Regards,
    Radoslav Georgiev
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Register for webinar
8 posts, 0 answered