Ooops, I understood the the problem, but I somehow messed up in my previous reply - sorry about the confusion. I did not mean the 404 page but the page you see when requesting the (expired) job. What is the query that you see in the web debug bar? What happens when you try this query in phpmyadmin?
The tutorial seems to be ok - when I follow the instructions I am redirected to the 404 page for the expired job. On Aug 1, 6:10 pm, Rivoot <[email protected]> wrote: > Claudia, > > Thanks for your answer. > > The issue I'm having is the following. > > In the jobeet tutorial, the list of jobs is generated based on their > status (expired, not expired). If a job is expired it won't be shown > in the homepage, but if you try to access the job by writing the url > directly in the browser you still can see the job information page (or > access to the show action of the job controller). > > The idea of the code I'm trying to implement (as it says in the > tutorial) is to avoid people accessing to the expired jobs even if > they input the url in the browser (instead of showing the job > information by clicking a link which is not being generated since the > job is already expired). > > Here comes the problem: I changed the code in both the routing.yml and > JobeetJobTable.class.php files but I'm still accessing the expired > jobs in the browser, even when I should be getting a 404 page. I > followed all the steps in the tutorial, so I don't know if I made a > mistake or the tutorial is wrong in some point. > > On Aug 1, 5:28 am, claudia_k <[email protected]> wrote: > > > Could you have a look at the sql log in the web debug bar when you are > > on the 404 page? There you will see the query that is used for > > fetching the job. > > What does this query look like? What happens when you try this query > > directly in mysql (e.g. using phpmyadmin)? > > > Claudia > > > On Jul 31, 6:24 pm, Mauricio Rivera Schneider > > > <[email protected]> wrote: > > > Hello, > > > > I'm working with the Jobeet tutorial and I'm having a little problem in > > > *day 6*. Everything works fine until I get to the "Secure the Job Page" > > > <http://www.symfony-project.org/jobeet/1_4/Doctrine/en/06#chapter_06_s...> > > > section. > > > > I added the code to the files just like the tutorial says, but I still > > > *can access* the expired job (I'm _not getting the 404 page_ as it > > > should). The url I'm using is the > > > following:http://jobeet.local/frontend_dev.php/job/sensio-labs/paris-france/20/... > > > > I made sure the ID is the correct in the database, also the fixtures are > > > correct and so it's the value of "expires_at" field. I verified it > > > running the SQL code |SELECT id, token FROM jobeet_job WHERE expires_at > > > < NOW().| > > > > Also, if I delete the function from the JobeetJobTable I don't get any > > > error when using the route pattern to access the expired job. > > > > These are my files: > > > > JobeetJobTable.class.php :http://pastebin.com/g9C2b8PP > > > apps/frontend/config/routing.yml :http://pastebin.com/bD7fA9JB > > > > Thanks in advance for any help you can provide. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
