Ported to Drupal 4.7..

Tigerstorm@crea... - March 19, 2006 - 20:33
Project:Question
Version:HEAD
Component:Code
Category:task
Priority:normal
Assigned:codepoet
Status:closed
Description

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

#1

Heine - March 19, 2006 - 21:18

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

#2

jjeff - March 20, 2006 - 01:19

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.

#3

Tigerstorm@crea... - March 20, 2006 - 13:50
Priority:normal» critical
Status:active» needs work

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 =)

AttachmentSize
question_0.module 15.07 KB

#4

Tigerstorm@crea... - March 21, 2006 - 12:07
Title:Problems submitting a question» Ported to Drupal 4.7..
Category:bug report» task
Priority:critical» normal
Status:needs work» fixed

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

AttachmentSize
question_1.module 15.07 KB

#5

UnderDesign - March 23, 2006 - 12:24

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;
}

#6

Anonymous - April 6, 2006 - 12:30
Status:fixed» closed

#7

codepoet - April 12, 2006 - 16:18
Version:<none>» HEAD
Status:closed» 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.

#8

codepoet - April 16, 2006 - 06:46
Status:needs work» needs review

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.

AttachmentSize
question.module.patch 12.96 KB

#9

tcviper - April 20, 2006 - 20:25

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

#10

codepoet - April 20, 2006 - 21:23

Is that after applying the above patch?

#11

Bob Morse - October 9, 2006 - 15:21

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

#12

jjeff - October 10, 2006 - 17:04

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

#13

codepoet - December 18, 2006 - 17:41

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.

#14

jjeff - December 21, 2006 - 03:59

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

#15

codepoet - January 17, 2007 - 01:31
Assigned to:Anonymous» codepoet
Status:needs review» fixed

Patch applied.

#16

spooky69 - January 24, 2007 - 02:39

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?

#17

Anonymous - February 7, 2007 - 02:45
Status:fixed» closed

#18

johan_lunds - February 13, 2007 - 07:38

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

#19

codepoet - February 20, 2007 - 06:39

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. :)

 
 

Drupal is a registered trademark of Dries Buytaert.