Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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 not found error


Reply

2 Posts   1264 Views

Avatar
yashd

30 April 2011 at 5:25am Community Member, 3 Posts

I am a codeIgniter developer and I just started using Sapphire framework and I cant help myself stop drawing parallels between the two but i fail miserably.

I created a job.php file inside mysite/code and wrote the below code inside the same:
------------------

<?php

class Job extends DataObject {
}

class Job_Controller extends Controller {

function order()
{
echo "hi";
}
}
?>

-----------------

And when i write --> localhost/silverstripe/job it says "Page not found"

Please help me here !!!

Avatar
JonoM

30 April 2011 at 1:37pm Community Member, 103 Posts

Are you only using the Sapphire framework or the CMS also? I've never worked with just the framework but if you're using the CMS I think you need to take a few steps back and start at the start - work through these tutorials and you should get a solid understanding of the basics :) http://doc.silverstripe.org/sapphire/en/tutorials/

(If you put localhost/silverstripe/job in your browser SilverStripe is going to try to run a function called 'job' on a page with a url of 'silverstripe' or look for a page called 'job' that's nested under the silverstripe page in the site tree (not sure which takes precedence). It's not finding either so you're getting a 404.)

Cheers