I had problems making this module work on the latest cvs. The attached patch fixes the bugs I found.

Comments

kbahey’s picture

Title: Feedback module patched » Patch for porting for Drupal 5.0
Status: Active » Needs review

Thank you for this patch.

I will wait for a while, since it is a bit to early to branch for 5.0.

filiptc’s picture

Priority: Normal » Critical
Status: Needs review » Needs work
StatusFileSize
new176 bytes

First of all, here is the needed .info file.

Patch does definitely not work for me (drupal 5 RC1). I get a blank page after activating the module (however it never seems to activate so drupal keeps on working fine). I get the error:PHP Fatal error: Call to undefined function _feedback_add_page() in feedback.install on line 26, referer: http://localhost/admin/build/modules

I did what I could to figure out what's going on although I'm not into php so I did not get far...

Porting this module to v.5 urges as RC1 is out.

Phil

kbahey’s picture

Priority: Critical » Normal

Patch does not apply cleanly.

Please roll a new patch.

Setting priority to normal.

wrunt’s picture

StatusFileSize
new9.87 KB

Here's a re-rolled version of stefano73's patch against the current cvs.

kbahey’s picture

Status: Needs work » Reviewed & tested by the community

Thanks

I committed this to HEAD, so the dev package for feedback should be created soon.

When someone tests that and confirms it is working, I will tag the module for 5.0, then we will have an official version.

wnoronha’s picture

The issue with the _feedback_add_page failing during a new install.
The fix: add require_once 'feedback.module';

Changes to the menu to make it more standard.
/**
* Implementation of hook_menu().
*/
function feedback_menu($may_cache) {
$items = array ();
if ($may_cache) {
$items[] = array (
'path' => 'feedback',
'title' => t('Feedback'),
'callback' => 'feedback_mail_page',
'access' => user_access('can send feedback'),
'type' => MENU_NORMAL_ITEM,
);

$items[] = array (
'path' => 'admin/settings/feedback',
'title' => t('Feedback'),
'description' => t('Configure the feedback page'),
'callback' => 'feedback_settings_page',
'access' => user_access('administer feedback'),
'type' => MENU_NORMAL_ITEM,
);
}
return $items;
}

kbahey’s picture

Warren,

I included your changes for the menu. Committed to HEAD.

About the require_once(), I see your point. Do you think this should be a permanent part of the .install file?

If so, please make a patch.

kbahey’s picture

Status: Reviewed & tested by the community » Fixed

Added fix for require_once.

stefano73’s picture

Status: Fixed » Needs review
StatusFileSize
new4.63 KB

Some code cleanup.

kbahey’s picture

Version: 6.x-2.x-dev » 5.x-1.x-dev
Status: Needs review » Fixed

Committed to HEAD and 5.x

Anonymous’s picture

Status: Fixed » Closed (fixed)