1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed two route filters conflicting

Discussion in 'Resolved Bug Reports' started by Live Free, Sep 20, 2013.

  1. Live Free

    Live Free Active Member

    Right now I have a route filter set up to change the forum url from forums/ to community/

    One category URL I have a route filter set up to change from site.com/community/writing-workshop to site.com/workshops - this seems to work okay However, the subforums still show as site.com/community/short-stories/general-ficiton (for example): I'd like to change these subforums to site.com/workshop/short-stories/general-ficiton. However, when I set up the filter it doesn't work, and the base of /communty/ remains.

    Do I have a conflict? Is it possible? If I disable the route filter changing /forums/ to /community/ and set each forum individually should that work?
     
  2. Mike

    Mike XenForo Developer Staff Member

    Only one filter is applied to a link. It processes from the most specific to the most generic. When you write filters, you need to write them based on the default URL, not partially processed ones (so all of them should be finding based on forums/ rather than community/).
     
    Live Free likes this.
  3. Live Free

    Live Free Active Member

    Ahh, okay, that helps.

    I'm still having problems when writing filters for child forums though.

    I have no problem now (thanks!) turning community/writing-prompts into just /writing-prompts (by using forums/writing-prompts).

    However, when I have writing-prompts/ in place and want to turn a subforum (community/writing-prompts/prompt-ideas, with forums/ -> community/ in place) - and I enter the filter based on forums/writing-prompts/prompt-ideas) into writing-prompts/ideas, it doesn't work. Instead, it shows site.com/writing-prompts for the parent forum, and site.com/community/prompt-ideas as the subforum (instead of site.com/writing-prompts/prompt-ideas.

    This is true for subforums, but I'm also having the problem when applying the same idea to a forum when the forum category url is rewritten. The only difference in this second case is that it actually does change the URL, but when I visit the forum from that new URL it gives and error.
     
  4. Live Free

    Live Free Active Member

    Actually looks like I figured it out generally, but I am having issues for forums and subforums when the category url is rewritten in particular. Though it changes the url of the forum in question, it doesn't bring me to forum, but instead an error message.

    Route Settings:

    Screen Shot 2013-09-20 at 2.39.04 PM.png

    Error with URL:

    Screen Shot 2013-09-20 at 2.38.52 PM.png

    Edit: If I disable the category route filter the problem is fixed. Is there anyway I can keep the category route filter in place also?
     
    Last edited: Sep 20, 2013
  5. Mike

    Mike XenForo Developer Staff Member

    Just to confirm, you're running 1.2.1 right? There was an issue in an earlier version (I believe) where this could happen.
     
  6. Live Free

    Live Free Active Member

    Yep, 1.2.1
     
  7. Mike

    Mike XenForo Developer Staff Member

    I've identified a bug here that affected how routes filters were translated back from incoming URLs. This meant that the category rewrite took precedence.

    I've fixed this for 1.2.2. You may need to disable and/or enable a route filter to trigger a cache rebuild. In the mean time, I'd probably disable the category rewrite.
     
    Live Free likes this.
  8. Live Free

    Live Free Active Member

    Great! I've gone ahead and disabled the category URL. Looking forward to the fix! Thanks.
     

Share This Page