On the normal /faq page on my site I had added the block for faq_ask and now whenever I go there to see a list of all FAQs, instead I only get the faq_ask form.

Comments

kuzma’s picture

bump

heyyo’s picture

Same issue here...

heyyo’s picture

function faq_ask_block($op = 'list', $delta = 0, $edit = array()) {
...
case 'view':
switch ($delta) {
...
case 1:
// Ask a question block.
$block['content'] = faq_ask_page(NULL);
break;
...

function faq_ask_page($tid = NULL) {
drupal_goto('node/add/faq', 'ask=true');
}

nancydru’s picture

Status: Active » Closed (duplicate)

See #437408: Redirect Loop for a workaround.

heyyo’s picture

Status: Closed (duplicate) » Active

This thread is not a duplicate ! But the the first thread talking about the Redirect problem with FAQ Ask block !
So my question is

Is Faq Ask Block abandonned ?

stenjo’s picture

Version: 6.x-2.0-alpha1 » 6.x-2.x-dev
Component: User interface » Code
Category: bug » task
Status: Active » Patch (to be ported)
StatusFileSize
new3.23 KB

I have created a patch that adds a FAQ Ask block that actually works for me.
Please test carefully.

stenjo’s picture

StatusFileSize
new6.56 KB

Hey, found out that the taxonomy was not properly handled in the block form. Fixed now + added the change from Sean Corrales on form redirect and changed from hook_form_alter() to hook_form_FORM_ID_alter(). No point in using a general hook and then do the same ting as a more spescialised hook does.
Again, test carefully and do not apply to live site without thorough testing.
By the way, I have spent quite some time writing a SimpleTest testscript for both the FAQ module and the FAQ-Ask module. I'll post those here when I have found out how to test a form in a block properly.
/Sten

stenjo’s picture

StatusFileSize
new3.95 KB

How difficult this should be. Too many parameters in function faq_form_faq_node_form_alter(). Corrected. Now things should go better...

rblackhawke’s picture

I'm getting the following when trying to apply patch:

Hunk #1 FAILED at 158.
Hunk #2 FAILED at 186.
Hunk #3 FAILED at 260.
Hunk #4 FAILED at 923.
Hunk #5 FAILED at 940.
5 out of 5 hunks FAILED -- saving rejects to file faq_ask.module.rej

stenjo’s picture

That message did not make mutch sense to me I'm afraid. Would you care to upload the file faq_ask.module.rej here or send it to me?

stenjo’s picture

Status: Patch (to be ported) » Needs review

This patch needs review rather than to be ported. Status of this issue is changed.

jon_stewart’s picture

Subscribing!

Excellent module.
Jon

jon_stewart’s picture

StatusFileSize
new4.53 KB

Here's the reject file

It would be funny if we were patching the wrong file! :-)

EDIT: ROFL...which turned out to be true!

Informal testing seems to indicate this is working. hopefully I'll get time to test later.

stenjo’s picture

Assigned: Unassigned » stenjo
Status: Needs review » Fixed

This is now fixed in the 2.x-dev version

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.