This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Day 6 : jobs and categories haven't appeared

Discussion around this tutorial for symfony 1.2-1.4

Day 6 : jobs and categories haven't appeared

by beginner » Fri Jul 01, 2011 10:52 am

Hi ,
Until day 6, I can see the jobs in the homepage. But I apply the changes in day 6, there is no error, and in database ; I have jobs and categories. Everythings seems normal but I can't see any jobs or categories in homepage. Do you think what is wrong in my project?
Thanks
Image
beginner
Junior Member
 
Posts: 9
Joined: Wed Dec 01, 2010 3:33 pm

Re: Day 6 : jobs and categories haven't appeared

by Jakobud » Fri Jul 01, 2011 6:10 pm

I'm new to Symfony as well so I might not have the best answer... but I am willing to bet it's something to do with when the jobs are set to expire. There is an expiration date for each job and during Day 6 at one point you set up the homepage to only show non-expired jobs. So look at the jobs in the database and see when the expired_at date/time is. If the date/time is < now, then they won't appear on the homepage.

One wacky thing about the Jobeet tutorial during this part is that when you edit the fixtures jobs.xml, if you don't specify the expired_at value for a job, then MySQL automatically puts in a default value of NOW() into it. So if you do
Code: Select all
 php symfony doctrine:data-load
at
Code: Select all
2012-07-01 12:30:45
and then switch to your browser and refresh the page at
Code: Select all
2012-07-01 12:30:48
then those jobs aren't going to show up because they are already expired 3 seconds ago. Kinda dumb implementation imo.
Jakobud
Junior Member
 
Posts: 27
Joined: Mon Jun 27, 2011 11:02 pm

Re: Day 6 : jobs and categories haven't appeared

by thiswayup » Sun Jul 03, 2011 6:33 pm

I had this same issue. I was wondering why the query wasnt returning any data.

The fix is to either change the expiry in the mysql or amend the fixture data.
thiswayup
Junior Member
 
Posts: 1
Joined: Mon Mar 30, 2009 11:33 am
Location: London, UK

Re: Day 6 : jobs and categories haven't appeared

by ereallstaff » Wed Jul 20, 2011 12:53 pm

hi go to frontend_dev.php and post what the SQL on the developer toolbar says

Then try to execute same queries, by a php my admin or something like that and see if effectively jobs are returned.

if it was a problem with expiration of jobs you should have empty categories
ereallstaff
Junior Member
 
Posts: 6
Joined: Wed Jul 20, 2011 12:11 pm