My web site has multiple feeds importers that I monitor using the Feeds Log view.

Because of the number of feeds importers running, the frequency they are run, and the number of events logged, I needed a new exposed filter which makes it possible to filter by Importer ID.

I have added an exposed filter for this purpose, exported the updated feeds log view to code, and created a patch to share this feature.

If you are interested, please take a moment to review this patch and to share your comments or feedback.

Thank you,
Gordon

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gturnbull created an issue. See original summary.

gturnbull’s picture

Title: Added Importer Exposed Filter to Feeds Log View » Added Importer ID Exposed Filter to Feeds Log View
gturnbull’s picture

gturnbull’s picture

Issue summary: View changes
Status: Active » Needs review
MegaChriz’s picture

Status: Needs review » Needs work

@gturnbull
It seems that your patch contains some environment specific configuration:

+  $handler->display->display_options['filters']['id_selective']['expose']['remember_roles'] = array(
+      2 => '2',
+      1 => 0,
+      3 => 0,
+      4 => 0,
+      9 => 0,
+      7 => 0,
+      14 => 0,
+      8 => 0,
+      6 => 0,
+      5 => 0,
+      10 => 0,
+      11 => 0,
+      12 => 0,
+      13 => 0,
+  );

It would be better if you export your view from within a clean install.

Still have to test the patch, though. I had only a few minutes for Feeds now.

gturnbull’s picture

Hi MegaChriz,
I removed the environment specific configuration settings, re-exported my view, and created a new patch.

Thank you for taking the time to review this new feature.

Thank you,
Gordon

gturnbull’s picture

Assigned: gturnbull » Unassigned
Status: Needs work » Needs review
MegaChriz’s picture

Status: Needs review » Needs work
FileSize
89.04 KB

I get the following error message on the feeds log page after applying the patch:

Notice: Undefined index: id_selective in views_handler_filter->accept_exposed_input() (line 1273 of /Users/youri/Sites/devdesktop/drupal7/sites/all/modules/contrib/views/handlers/views_handler_filter.inc).

See also the image:

I checked if I could fix the error by editing the view, but then I could only add a text field as exposed filter for the importer. A field where you can select the importer would indeed be nicer. I think that you have an extra module installed so that the exposed filter became a select field? Anyway, to fix this for everyone we probably need a Views filter plugin specific for the importer ID.

gturnbull’s picture

Hi MegaChriz,

I figured out the problem! The exposed filter I added for the Importer ID field uses a select box feature provided by the views_selective_filters module.

I updated the feeds.info file to include a dependency for the views_selective_filters module, then generated an updated version of my patch.

If you have a moment, please test my latest patch and let me know what you think.

Your feedback is greatly appreciated.

Thanks,
Gordon

gturnbull’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 9: feeds-importer-id-exposed-filter-2849636-3.patch, failed testing.

MegaChriz’s picture

Hm, adding an extra dependency for Feeds for such a small feature doesn't look like a good idea to me. People will complain that they would need to install an extra module for a feature that they don't use. See for example #1355994: Remove Job Scheduler dependency.

The way to fix this with the least impact is to write a specific Views filter handler for the Importer ID field.

gturnbull’s picture

Hi MegaChriz,
Thanks again for your feedback. I will create a separate views handler to power the select box filter implemented for the Importer ID field.

In the meantime, I noticed an error in my last patch. The machine name of the module referenced by the dependency was not correct. Updated patch attached.

Thank you,
Gordon