Silverstripe upgrade to 4.5.2 :: No URL rule was matched

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version:3.7 to 4.5.2

Question:dev/build?flush=1 gives No URL rule was matched

I am trying to upgrade my silverstripe site from 3.7 to 4.5. I managed to go through all the steps till 8 of the upgrade process. Now when i try to do <>/dev/build/?flush=1 i get No URL rule was matched. Actually visiting anything of the site gives me “No URL rule was matched”

I some one point me in the right direction as in where and what to look for please

I have routes.yml and its working fine in 3.7 but not in 4.5

Cheers
RD

Are you trying from a browser or in the command line?

If the browser isn’t working, it might be worth trying to run via the command line. (https://docs.silverstripe.org/en/4/developer_guides/cli/)

If the command line works, then check the web server config - are you using the public directory, does it contain the right files, is the server set to use it as the document root, etc.

thanks for the reply. Yep i tried from both end and the result is the same. “No URL rule was matched”. I check the settings and they seam to be in place as how they should be. Again i used the upgrade tool kit.

Are you have custom Controllers? Have you a routes.yml file? If not you probably need one $Action/$ID/$OtherID are not defined automatically anymore.
Looks something like this:

Name: approutes
After:

  • #coreroutes

SilverStripe\Control\Director:
rules:
‘Import//$Action/$ID/$Other’: ‘Import’
‘jsonapi//$Action/$ID/$OtherID’: ‘JSONAPI’
‘Block_Controller//$Action/$ID/$OtherID’: ‘Block_Controller’
‘SearchPage_Controller//$Action/$ID/$OtherID’: ‘SearchPage_Controller’

What’s in the After section of your routes.yml file? I found on a recent project that this blocked me from accessing the CMS:

After:
  - "#rootroutes"
  - "#coreroutes"

But this worked:

After: "*"

Thanks guys, managed to solve this now. In one of my modules i had used Director::config()->set instead of ->update…with the set method…only my module’s routes were getting recognize. After updating this to ->update routes are working

Thanks :slight_smile: