Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
- Fixed aggregator/sources/#/categorize tabs callback.
- Fixed aggregator/sources/#/configure tabs callback.
- Fixed form elements for categorization being displayed to show up below the feed the belong to, instead of all the feed items then a list of categorization form elements with no reference. Might be a better way to do this as my fapi mojo ain't that great.
- Fixed /categorize tab not being styled due to incorrect #id (#aggregator_page_source instead of #aggregator).
- Fixed last updated time being styled by t(), which get munged by l().
Comment | File | Size | Author |
---|---|---|---|
#1 | aggregator.5.0_0.patch | 3 KB | Kjartan |
aggregator.5.0.patch | 3.33 KB | Kjartan | |
Comments
Comment #1
Kjartan CreditAttribution: Kjartan commentedUpdated patch that fixes everything in a much more elegant way, and saving re-categorization actually works! Also merged in the missing fixes from #83573.
Thanks to chx for putting up with all my annoying fapi questions.
Comment #2
chx CreditAttribution: chx commented$form = drupal_retrieve_form('aggregator_page_list', $sql, $header, $categorize);
after this, I have no idea why that #base is needed. The form_id isaggregator_page_list
, why are you setting #base then? Here is an excerpt from form.inc:and
I skip the #submit code, but clearly, setting #base to $form_id serves no purpose.
Comment #3
Kjartan CreditAttribution: Kjartan commentedAhh, you would think so, but alas no. All drupal_retrieve_form does is get the form data. drupal_get_form does the submit/validate/theme stuff, and it is called from the menu callback:
drupal_get_form('aggregator_page_source', $feed)
aggregator_page_source() gets the $feed data, and passes it on to _aggregator_page_list, which drupal_retrive_form('aggregator_page_list'). This is fine and dandy to get the form, but since drupal_get_form() is using a completely different form id ('aggregator_page_source') none of the hooks get called. Now if 'aggregator_page_list' were just called from one function we could just rename stuff and call the right thing initially, but it is also used in drupal_get_form('aggregator_page_category'). Hence the use of #base to force drupal_get_form() to call the proper callbacks, without having to duplicate all the callbacks for aggregator_page_source/aggregator_page_category.
Comment #4
chx CreditAttribution: chx commentedI am blind. I thought that retrieve is a get. Sorry.
Comment #5
Kjartan CreditAttribution: Kjartan commentedComment #6
(not verified) CreditAttribution: commented