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.
I'm not sure if you want to customise the exports, but not all installations have filter format of ID 1.
- $handler->display->display_options['empty']['area']['format'] = '1';-
+ $handler->display->display_options['empty']['area']['format'] = variable_get('filter_default_format', 1);
Comment | File | Size | Author |
---|---|---|---|
#5 | feeds_default_views_empty_text.png | 11.87 KB | star-szr |
#5 | feeds_default_views_no_empty_text.png | 10.67 KB | star-szr |
#4 | feeds-default_view-1620110-4.patch | 21.73 KB | JvE |
#1 | feeds-1620110-1.patch | 15.12 KB | star-szr |
Comments
Comment #1
star-szrFormat IDs are no longer numeric in Drupal 7 (#934050: Change format into string). I think the default views should be updated anyway since Views is no longer in alpha - arguments are contextual filters now, for example. I re-exported the default views (running Views 7.x-3.3), and removed the text format of 1 from the revised export (Views can figure out the format). I didn't do any other massaging of the exported view other than adding a human name of "Feeds log".
This export also adds items to the $translatables array, that seems to be new as well.
Comment #2
star-szrActually, without this change, the empty text is not displayed at all when visiting node/%/log - so it's not just a watchdog error.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch makes sense.
Do we also need a .install file update_N() routine to update the views?
Comment #4
JvE CreditAttribution: JvE commentedThe $translatables is a Features thing, not a views export thing.
There are some other changes between views-3.0-alpha1 and views-3.0. If we're changing the version, I think we should take those along as well.
If you take the current feeds_log view and open/save every item/setting and then export the view, it shows a couple more differences.
Comment #5
star-szrThanks @JvE. The patch looks good, I tested it using the minimal install profile.
Without the patch, no empty text is shown and a watchdog error is logged. After applying the patch and clearing the cache, the empty text is shown and there are no watchdog errors.
Before:
After:
Comment #6
twistor CreditAttribution: twistor commentedhttp://drupalcode.org/project/feeds.git/commit/3cf2de4