Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
What's Changed About Routes in Latest Fixies?
  • I just downloaded latest version of Fuel and here comes my problem. In routes.php I have something like this...
    return array(
     '#' => 'pages/index',
     'pages/sign-in' => 'pages/signIn',
     'pages/sign-up' => 'pages/signUp'
    );
    

    In beta 1 symbol "#" meaned that it's default route. Now, by manually typing "pages/index" in URI I can access that page, but by opening "example.com/" it say that there's 404 error. Any ideas? Edit: Here is my log file... but it don't give me any useful info.
    Info - 2011-03-14 21:45:30 --> Fuel\Core\Request::factory - Creating a new Request with URI = ""
    Info - 2011-03-14 21:45:30 --> Fuel\Core\Request::active - Called
    Info - 2011-03-14 21:45:30 --> Fuel\Core\Request::factory - Setting main Request
    Info - 2011-03-14 21:45:30 --> Fuel\Core\Request::execute - Called
    Info - 2011-03-14 21:45:30 --> Fuel\Core\Request::show_404 - Called
    Info - 2011-03-14 21:45:30 --> Fuel\Core\Request::active - Called
  • Not quite sure what your problem is, but in the config.php file there is something like this:
     /**
      * index_file - The name of the main bootstrap file.
      *
      * Set this to false or remove if you using mod_rewrite.
      */
     'index_file' => 'index.php',
    

    So I think you need to navigate to: example.com/index.php/pages/index And that should work.
  • Nope, 'index_file' is set to false. Sorry for my pure explanation. When user goes to "example.com/" without anything after slash... default route should be called, right? It just don't work as supposed to! In routes.php next to "#" symbol is route to call. It doesn't call, but throws 404 error. But if I try to open that controller/action manually - it works! Weird.
  • Hmm, still don't understand what you're getting at. What about if you try navigating to "example.com/public"? I think this may be what you are missing here.
  • I don't know how to explain more precisely. Fuel is working! Every route is working! But URI like "example.com/" don't work. The same controller can be loaded using "example.com/index/index".
  • what happens if you get rid of the slash, and just type http://example.com
  • Hello, if you can look here: https://github.com/fuel/fuel/tree/develop/fuel/app/config
    you can see that there is a routes.php file already, for routing. and the default is changed from # to _root_ :) good luck!
  • Huglester, thanks. =]
  • that brings up an interesting question for me, I am new to github. how often do I need to "refresh" my clone of the code on github? since i am not strong enough to contribute yet, i will just clone fuel to my local ubuntu server, and play with it. should I be cloning fuel to a folder on my computer that is separate from the code I am developing, so I don't overwrite anything i have created? then refresh my local clone from github, and copy / paste the new files over the old files, and don't overwrite /app ? (I just read the docs again quickly, but didn't see any explicit instructions telling me that all my code goes under /app - I hope this is correct) or as long as I am not hacking the core I will be ok to get periodic refreshes that overwrite the previous framework files? Should I look at github daily, to see what files have been updated, and then do a refresh?
    or just refresh everytime I start to write code?
    then if something breaks, go look at the history of github to see what was changed?
  • One thing to note is that you would do this code "refresh" only until stable version is released.
    From there you just use that, you won't be needing to update so often.
    Maybe only when a security or bug fix will be released, and of course when new major versions is released if you want to upgrade.
  • ok, now I just need to learn what the command is to get a refresh in git please tell your thoughts on keeping my git repo in a separate folder, so my code in /app is not overwritten? or do I use git ignore to make sure that folder is not overwritten?
  • Steve Wasiura wrote on 03/15/11 4:32 pm:
    ok, now I just need to learn what the command is to get a refresh in git please tell your thoughts on keeping my git repo in a separate folder, so my code in /app is not overwritten? or do I use git ignore to make sure that folder is not overwritten?

    I would use the git ignore file. To update your local copy of fuel, just type "git pull origin" once you're in the fuel directory (and in the develop branch).
  • don't know about you guys but HMVC routing isn't working from the dev branch
  • I'm looking into it, it was reported in a different thread as well... See this thread (to avoid multiple threads about the same subject)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion