Jump to:

23546 Posts in 19335 Topics by 2889 members

General Questions

SilverStripe Forums » General Questions » Nested URLS problem

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 3419 Views
  • Krille Brocket
    Avatar
    Community Member
    10 Posts

    Nested URLS problem Link to this post

    Hi

    I have enabled nested url:s using SiteTree::enable_nested_urls(); in my _config.php file.
    Everything works fine until the nesting level is 5 level deep, then i receive:

    Sorry, it seems you were trying to access a page that doesn't exist.
    Please check the spelling of the URL you were trying to access and try again.

    I.e the url looks something like this:

    http://localhost/silverstripe/collections/mycollection/mycategory/mygender/product1

    If I move the product page into the "mycategory" or "mycollection" then it works fine.

  • tobych
    Avatar
    Community Member
    97 Posts

    Re: Nested URLS problem Link to this post

    I don't know why this is happening, but I do wonder whether having that many levels of "nesting" is a good idea. Is it really necessary, for your site? Have you tried a simpler solution with users and found that they're deeply unhappy? I'd be suprised if anyone really needed that.

  • Krille Brocket
    Avatar
    Community Member
    10 Posts

    Re: Nested URLS problem Link to this post

    Yes I think so, because I want to be able to filter and group my products based on collection, category and gender and all these "containers" are held inside the actual "collections" page.

    But, perhaps there is a nicer solution?

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: Nested URLS problem Link to this post

    This issue was fixed in http://open.silverstripe.org/changeset/95902, and will probably find its way into the next 2.4 alpha.

  • geoffmcqueen
    Avatar
    Community Member
    11 Posts

    Re: Nested URLS problem Link to this post

    Sorry, am a real noobie with SS: the SiteTree::enable_nested_urls(); method is really appealing: is this available in the current stable release, or only in 2.4?

    If it is possible to get in the current stable release, is there a module I can/should/need to download? I tried adding the directive listed above to the _config.php with a default install of the latest stable, and understandably it caused a white screen error.

  • tobych
    Avatar
    Community Member
    97 Posts

    Re: Nested URLS problem Link to this post

    Nested URLs are only available in the 2.4 branch, not 2.3 or earlier.

    Also, if you're getting a "white screen", make sure you've enabled development mode so you can see more details when there are problems.

  • geoffmcqueen
    Avatar
    Community Member
    11 Posts

    Re: Nested URLS problem Link to this post

    Thanks for the heads up. I've downloaded the branch from http://svn.silverstripe.com/open/phpinstaller/branches/nestedurls/ and am just about to go and get some dependencies (specifically I'm up to getting sapphire).

    Again, a bit of a noob question, but is there version parity between sapphire and silverstripe? I've already got sapphire as part of the latest stable build from a couple of days ago, but since the SVN path doesn't include a version number, I'm not sure whether I should be getting a new sapphire (and I think the same will go for TinyMCE stuff I've seen mentioned as a separate external import that's needed later) for this branch, or can I use the sapphire I already have?

  • geoffmcqueen
    Avatar
    Community Member
    11 Posts

    Re: Nested URLS problem Link to this post

    Got the nestedurls branch installed, but using the existing sapphire from stable wasn't good enough: the install process happened, but then when it came to loading the page, there are just white-screens and the error:

    PHP Fatal error: Call to undefined method SiteTree::enable_nested_urls() in /data/www/silverstripe-nested/mysite/_config.php on line 29, referer: http://silverstripe-nested/install.php

    Sorry for peppering you all with these (probably very basic questions): it is just that without hierarchal URLs, I'm going to have to do some massive mod_rewrite experimenting, so I'm keen to get this POC sorted from the nested branch...

    3419 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.