Redirecting from faq to node/add/faq?ask=true
stenjo - November 13, 2009 - 15:58
| Project: | FAQ_Ask |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
When I upgrade FAQ_Ask from 1.2 to 2.0 my link at www.mysite.com/faq is automatically redirected to www.mysite.com/node/add/faq?ask=true
Effectively this disables my FAQ page :-(
What have I missed here?
FAQ module version 6.x-1.8
PHP version is 5.2.10 and MySQL version is 5.0.77.

#1
I experience the same redirection, except for some reason this takes me back to my 'home' (node) page. I didn't upgrade, however, but a first install of FAQ and then FAQ_Ask. I fulfilled all of the requirements for it's operation according to the directions, etc - and having fulfilled these, went to try it out. When I click "Ask a question", it takes me to the front-page and the address bar shows the same address... www.mysite.com/node/add/faq?ask=true Am I doing something wrong? Is there a way around this? I'm fairly new in Drupal (about 9 months) so it may very well be my own error, but as was said above - "What am I missing here?"
#2
I tried to add the FAQ-Ask block and now I cannot access the site.
In IE it just loads indefinitely.
In Firefox, I get the following error:
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
It doesn't matter what page I try to access and whether I'm logged in or not.
I deleted the entry for this module in the database, re-enabled the module and got the same issue.
Every page I tried to manually browse to would give me the error.
Removed it again via database, re-added, and I got an error about the tables already being created, but then it worked.
*shrugs*
#3
Same happening for me. Looks like the problem is in the "ask a question" block the module creates. Causing a redirect loop. I commented out some lines there and added a break to that switch statement. Line 865 in faq_ask.module:
case 1:// Ask a question block.
/*
if (user_access('ask question')) {
$block['content'] = faq_ask_page(NULL);
}*/
break;
This fixed the issue. That particular block is not really needed anyway, just create a menu item to allow people to ask a question. Have it point to "faq_ask" (that's the Drupal path). Works for me.
#4
This fixed my problem. Thank you.
I would actually have drilled down into the block implementation at some point to find the root cause of this, but I realize that I really do not need the ask block at all. The limitations with it causes users to create long questions that are used as node title and I have to edit it all before it is passed to the expert for answering.
This looks good.
Now, the problem that appears is the one listed in Role with "ask question" cannot ask
- but that is another issue.
Thanks again.
/Sten
#5
A quick look into this and to me it seems that this is an error by design.
Basically when the Block is enabled, the returned value of faq_ask_page(NULL) is added to the output. The problem is that
<?phpfaq_ask_page(NULL)
?>
<?phpdrupal_goto()
?>
Does anyone know why this is designed that way?
/Sten