Hi I've tried to install this module on a 4.7-beta 6 site and some problems occured..
Everything seems to work okay, I can watch the queue in Admin menu but when someone tries to ask a question I'm getting this error message:

Fatal error: Call to undefined function: form_textfield() in /home/xxxx/xx.xxxxx.org/modules/question/question.module on line 350

Best regards

Comments

heine’s picture

Most likely cause: http://drupal.org/node/50099

jjeff’s picture

Yes. This module has not yet been ported to 4.7. If you (or someone else) would like to port it, I'd be happy to commit the update.

A good place to start with porting a module is the FormUpdater which you can find here. It won't do all the work for you, but if you're handy with Drupal coding already, it'll take out a lot of the tedium of converting to the new form api.

Tigerstorm@creativebits.org’s picture

Priority: Normal » Critical
Status: Active » Needs work
StatusFileSize
new15.07 KB

Hi jjeff!
First of all I want to say thanks for making that kind of code updater on http://www.lullabot.com
I'm not really a coder but I wanted to give it a try with help of using your code updater and managed todo this:

I've done all the code changes that the formupdater told me to change and then the "Ask a question form" began to work and I could send a question, but when I was going into Administer/Questions then this message came up:

Fatal error: Call to undefined function: check_output() in /home/xxxx/xx.xxxxxxxxxx.org/modules/question/question.module on line 251

I attached the changed .module file and hope you might know the answer to this? It seems when you get one thing working, anotherone stops working =)

Tigerstorm@creativebits.org’s picture

Title: Problems submitting a question » Ported to Drupal 4.7..
Category: bug » task
Priority: Critical » Normal
Status: Needs work » Fixed
StatusFileSize
new15.07 KB

I've succeded to port this module to Drupal 4.7 after found that check_output() has changed since 4.6 to 4.7 with the new API..
You can send in a question through "Ask a question" and then later it will popup in Admin/Questions..

Thing I wonder about it jjeff.. When you answer a question I'm being directed to create either a forum topic, blog, poll etc. I thought there would be a special question node or something like that..

Best regards

Patrick Nelson’s picture

In order for the admin settings page to work with the latest CVS, the question_settings function needs to be changed to the following:

function question_settings() {
  // require users to be registered in order to ask questions?
$form['question_require_registered'] = array(
  '#type' => 'checkbox',
  '#title' => t('Require registered users?'),
  '#return_value' => 1,
  '#default_value' => variable_get('question_require_registered', FALSE),
  '#description' => t('Should we require users to be authenticated in order to submit questions?'),
);
$form['question_thanks'] = array(
  '#type' => 'textfield',
  '#title' => t('Path to "Thank You" node'),
  '#default_value' => variable_get('question_thanks', FALSE),
  '#size' => 40,
  '#maxlength' => 100,
  '#description' => t('This is where users will end up after they submit the question form. Example: "node/454".<br/>Leave blank and user will be returned to the form page with a thank you message.'),
);
  return $form;
}
Anonymous’s picture

Status: Fixed » Closed (fixed)
codepoet’s picture

Version: » master
Status: Closed (fixed) » Needs work

The last patch (and comment) doesn't solve everything. This module doesn't create a "Question" node type in 4.7, so promoting a question fails.

codepoet’s picture

Status: Needs work » Needs review
StatusFileSize
new12.96 KB

Okay, I took a few hours and completely redid the forms portion of this module. It now completely works in 4.7 over here from adding questions to managing the settings and queue, to promoting and editing the question nodes.

Please test this patch against the CVS HEAD of this module and see how it goes. It looks ready to me.

tcviper’s picture

Im getting a blank page when click on settings > question and i imported the sql dbase, any idea? (DRUPAL 4.7)

codepoet’s picture

Is that after applying the above patch?

BMorse’s picture

Is this module still underdevelopment for 4.7? It looks like just the thing I need for a project.

jjeff’s picture

Though there's an off chance that I'll get a burst of energy to update this module, I'm not using on any of my current sites, so it's kind of fallen by the wayside.

If anyone would like to adopt it, please contact me.

-Jeff

codepoet’s picture

I actually have ported this to Drupal 5 already. I've sent Jeff a request to adopt the module. Which is to say, one way or another this will keep going.

jjeff’s picture

Hey Codepoet...

Sure, I'd love to set you up as the maintainer of this module.

I had an email snafu recently, so send me another email. We'll get you all set up so you can commit all your fixes!

-jeff

codepoet’s picture

Assigned: Unassigned » codepoet
Status: Needs review » Fixed

Patch applied.

spooky69’s picture

Codepoet - it was stated above that you had already ported this to 5 and it seemed likely that you would be taking over this module. Is this available for 5 yet?

Anonymous’s picture

Status: Fixed » Closed (fixed)
johan_lunds’s picture

Yeah I'd also like to see a port to Drupal 5.

codepoet’s picture

Hey guys. I've taken it over and I'm working on the 5.0 version, yes. I want to be on 5.0 as well, so please bear with me. :)