In the new version, aggregator_menu() says:
$items['admin/content/aggregator/edit/feed/%aggregator_feed'] = array(
'title' => 'Edit feed',
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_feed', 5),
'access arguments' => array('administer news feeds'),
'type' => MENU_CALLBACK,
);
But the function aggregator_form_feed() takes $edit as an argument.
function aggregator_form_feed($edit = array('refresh' => 900, 'title' => '', 'url' => '', 'fid' => NULL)) {
If I understand the new menu system correctly, 'page arguments' => array('aggregator_form_feed', 5), means "Send arg(5) [the feed id] to the function aggregator_form_feed()." Since that function is expecting the $edit array(), the page loads an empty form.
Attached patch corrects the behavior by rewriting:
function aggregator_form_feed($fid, $edit = array('refresh' => 900, 'title' => '', 'url' => '', 'fid' => NULL)) {
But I'm not entirely sure this is the proper fix, as $fid is never invoked with the function. But it works.
Marking 'critical' because it is a total failure of the function.
Comments
Comment #1
agentrickardCode needs review.
Comment #2
agentrickardAfter talking with chx in IIRC, this seems to be a FAPI3 implementation bug, so moving to that queue.
As written, the function:
Returns only the $form_state value, which needs to be expressed in the function.
New patch attached
Comment #3
agentrickardSame problem with aggregator_category_form(). new patch
Comment #4
agentrickardMight help if I passed by reference correctly.
Comment #5
dvessel commentedErrors are gone when adding feeds and categories.
I do get a notice when saving a feed but it's not related to this patch.
Comment #6
dvessel commentedAnd the issue for that's here.. http://drupal.org/node/132369
So, this one's RTBC.!
Comment #7
gábor hojtsyThanks, committed!
Comment #8
(not verified) commented