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

Forums / Bugs & Issues / More Duplicate content issues

More Duplicate content issues

11 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    04 Dec 2012
    Link to this post
    Just posting this here to drum up support\exposure for the problem

    The module builder generated DynamicContentView control allows you to set where the single item is rendered (dynamic or on a new page)

    So if you choose new page then the link for the items in the list are updated to reflect that.  HOWEVER if someone was to just append a valid content item url into the page with the list, then it responds by showing the content item where it SHOULD 404.

    /items        (shows the list)
    /items/detail/item1      (single page to show the detail item)
    /items/item1        (this should 404 when I've chosen single page view)

    Steve
  2. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    09 May 2014 in reply to Steve
    Link to this post

    Is there a solution to this now?  I am trying to get up to speed on how Sitefinity works with Canonical settings and etc. but right now I am in the same boat that you were.

    I had just a single page that I was lettering auto-generate to details view which was fine, but not the page functionality requires that I break it out to have the master list on one and then details on a separate page.  My fear is that there is already going to be a lot of urls that Google has indexed and because of this scenario the chance for getting penalized for duplicate content seems high to me.

     

  3. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    09 May 2014 in reply to Stacey
    Link to this post

    Yeah, if you edit the widget in advanced mode theres a property at the top called something like ContentViewMode or something...should be "Auto"

     In the browser set it to "Master" and in the detail set it to "Detail"

     Now it should properly 404, however you're gonna have to implement some custom logic to 301 not break existing links to the detail items...

  4. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    09 May 2014 in reply to Steve
    Link to this post

    Forums seem a bit confused though

     These should 404

    http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/more-duplicate-content-issues
    http://www.sitefinity.com/developer-network/forums/more-duplicate-content-issues

  5. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    09 May 2014 in reply to Steve
    Link to this post

    Well I had already done what you just said, but I had noticed that the URL still was showing for the single item when viewing the master list so I was concerned about not having a proper 301.

     I can handle the 301's with IIS.  I am not seeing it 404 though.

  6. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    09 May 2014 in reply to Stacey
    Link to this post

    So 

     /page/master/item1 still works? When it should be /page/master/detail/item1?

     Could there be another DynamicContentView control on the page that's still reacting to "Dynamic Pages"?

  7. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    09 May 2014 in reply to Steve
    Link to this post

    To be more clear.  I went to my single page and took the widget from Auto to Master.  Then I made a new page and put a widget there set to Detail. Going to domain.com/news/2014/11/22.... should have caused a 404 right?

    But instead it rendered the news list and gave a status of 200, but still showed the url as domain.com/news/2014/11/22 and not domain.com/news

    Edit:  This is with the news module.  So the correct url should be /news/article/2014/11/22... which will work, but the old url still works too /news/2014/11/22 instead of a 404.

    There is  only one DynamicContentView control on each page

  8. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    09 May 2014 in reply to Stacey
    Link to this post

    Well you got me looking in the right direction at least.  There is definitely something going on with how it is interacting with other widgets in my template.  Trying this on a blank sitefinity page does generate a 404.  There are no other content based modules on this particular page, but I do have some MVC widgets that maybe are doing something odd with routing.

  9. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    09 May 2014 in reply to Stacey
    Link to this post

    Yep, so the culprit is my MVC widgets that use:

    protected override void HandleUnknownAction(string actionName)
           {
               View("Default", model).ExecuteResult(this.ControllerContext);
           }

     

  10. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    Registered:
    06 Dec 2016
    14 May 2014
    Link to this post
    Hi,

    I would suggest you to review the following blog post:

    http://www.sitefinity.com/blogs/stefani-tacheva-s-blog/2014/03/11/how-to-check-whether-url-parameters-are-resolved-in-pages-with-mvc-widgets


    Regards,
    Stefani Tacheva
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  11. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    14 May 2014 in reply to Stefani Tacheva
    Link to this post

    Stefani,

     Thanks for linking that.  I recall reading it some time back and I suppose at the time it did not occur to me where I would use that.  I changed out all my MVC widgets to include the check for Resolved URL Parameters and now I get a proper 404 status code when I would expect one.

    Important 

     I would like to point out to anyone following that article that you more than likely want to put the call to View("Default").ExecuteResult(this.ControllerContext); outside of the "If" statement otherwise you put yourself right back into the reason you are using HandleUnkownAction.  Meaning that when used exactly like the blog post I was seeing my widgets dissappear when another control goes into details view.  

     Here is the finished code that works for me:

    protected override void HandleUnknownAction(string actionName)
    {
        if (!RouteHelper.GetUrlParametersResolved())
            this.Response.StatusCode = (int)HttpStatusCode.NotFound;
        else
            this.Response.StatusCode = (int)HttpStatusCode.OK;
     
        InitializeControls();
        View("Default").ExecuteResult(this.ControllerContext);
         
    }

    With that I now get a 404 when I want and I still have my widgets showing up when other controls invoke details mode.

11 posts, 0 answered