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

Class 'QuestionForm' Not Found when generating CRUD

Discussion around this tutorial for symfony 1.0.x

Class 'QuestionForm' Not Found when generating CRUD

by Russpd » Wed Sep 03, 2008 9:54 pm

Hi,

I am following the Askeet tutorial and I hit a snag on Day 2 when trying to test data access via a CRUD. I got an eror saying Class QuestionForm not found in ...\generate\sfAdminGenerator after following the directions laid out. I was wondering if anyone had a similar error. I am a bit puzzled because I was able to do propel-build-all from the command line using a similar command.

Thanks
Russpd
Senior Member
 
Posts: 105
Joined: Wed Sep 03, 2008 9:46 pm

Re: Class 'QuestionForm' Not Found when generating CRUD

by halfer » Thu Sep 04, 2008 10:10 am

Have you cleared your cache?
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Class 'QuestionForm' Not Found when generating CRUD

by sergio.avalos » Fri Sep 19, 2008 4:52 am

I found exactly the same problem. I also cleared the cache as you suggested but still the same result :(~ :-(~ :sad:
sergio.avalos
Junior Member
 
Posts: 1
Joined: Fri Sep 19, 2008 4:49 am
Location: Mexico

Re: Class 'QuestionForm' Not Found when generating CRUD

by duli » Wed Sep 24, 2008 4:11 am

Same trouble here:

Code: Select all
[duli@localhost askeet]$ symfony propel-generate-crud frontend question Question
PHP Fatal error:  Class 'QuestionForm' not found in /usr/share/pear/symfony/generator/sfAdminGenerator.class.php on line 722

Fatal error: Class 'QuestionForm' not found in /usr/share/pear/symfony/generator/sfAdminGenerator.class.php on line 722


Cleanning the cache didn't solve it. :(~ :-(~ :sad:

Code: Select all
[duli@localhost askeet]$ symfony -V
symfony version 1.1.2 (/usr/share/pear/symfony)


Any ideas?

Thanks
duli
Junior Member
 
Posts: 11
Joined: Wed Sep 24, 2008 3:55 am
Location: Sao Paulo, SP

Re: Class 'QuestionForm' Not Found when generating CRUD

by duli » Wed Sep 24, 2008 4:22 am

duli
Junior Member
 
Posts: 11
Joined: Wed Sep 24, 2008 3:55 am
Location: Sao Paulo, SP

Re: Class 'QuestionForm' Not Found when generating CRUD

by halfer » Wed Sep 24, 2008 11:11 am

Sorry, I should have spotted you were working with 1.1. Yes, give My First Project (1.1) a go instead, it's at least designed to work with 1.1 :)~ :-)~ :smile:
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Class 'QuestionForm' Not Found when generating CRUD

by duli » Wed Sep 24, 2008 1:59 pm

Are there any plans to update askeet tutorial to 1.1?
duli
Junior Member
 
Posts: 11
Joined: Wed Sep 24, 2008 3:55 am
Location: Sao Paulo, SP

Re: Class 'QuestionForm' Not Found when generating CRUD

by halfer » Wed Sep 24, 2008 2:58 pm

Not as far as I am aware - that would need a volunteer. Anyone interested in doing so should declare it on the devs list, I am sure it would get a good reception.
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Class 'QuestionForm' Not Found when generating CRUD

by duli » Wed Sep 24, 2008 10:49 pm

Hum, ok.

So I must assume there are huge/important differences between 1.0 and 1.1, right?!

In that case, it wouldn´t help for those who want to learn (beginners like me) to proceed the askeet tutorial using 1.0?!

Thanks
duli
Junior Member
 
Posts: 11
Joined: Wed Sep 24, 2008 3:55 am
Location: Sao Paulo, SP

Re: Class 'QuestionForm' Not Found when generating CRUD

by liaolliso » Wed Oct 08, 2008 10:47 am

Hi , I have fixed this problem after comparing with the above comments and finally got this worked with version 1.1.
Thanks for the people above.

Following is my solution:

Begin:
1. When you got this topic's error, you could use this command
'symfony propel:build-forms' at the askeet directory.
2. Then excute these commands
'symfony propel:generate-crud frontend question Question',
'symfony propel:generate-crud frontend answer Answer',
'symfony propel:generate-crud frontend user User',
'symfony propel:generate-crud frontend interest Interest',
'symfony propel:generate-crud frontend relevancy Relevancy'
3. Then this 'symfony cc'
4. Then go to find lib/model/Question.php and add this function to the class.
<code>
public function __toString(){
return $this->getTitle();
}
</code>
Also for every other four classes in the same directory. This is important.
5. Open your browser and type 'http://localhost/askeet/frontend_dev.php/question', then you will find it working.

This is only for this topic, you could find more after your exploring.

Hope helping somebody!
liaolliso
Junior Member
 
Posts: 4
Joined: Wed Oct 08, 2008 10:27 am
Location: Beijing, China

Re: Class 'QuestionForm' Not Found when generating CRUD

by duli » Fri Oct 10, 2008 2:27 am

liaolliso: Hey, great help!

What about the rest of the tutorial? Have you ever completed it?

Thanks a lot!
duli
Junior Member
 
Posts: 11
Joined: Wed Sep 24, 2008 3:55 am
Location: Sao Paulo, SP

Re: Class 'QuestionForm' Not Found when generating CRUD

by liaolliso » Fri Oct 10, 2008 5:04 am

Oh ,i'm also a beginner. In fact i really don't complete learning this tuturial . But I'm going to follow this askeet tuturial. If there were problems , we could get them fixed here.
Just follow it. They likely have the same or similiar principle between version 1.0 and 1.1.

Very glad that helps you! :D~ :-D~ :grin:
liaolliso
Junior Member
 
Posts: 4
Joined: Wed Oct 08, 2008 10:27 am
Location: Beijing, China