Closed (fixed)
Project:
Taxonomy display
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
28 Mar 2012 at 23:06 UTC
Updated:
31 Oct 2012 at 16:21 UTC
Jump to comment: Most recent file
I have enabled this module. Configured all on the taxonomy page and than tried to disable it later and unchecked the "Use custom display settings for the following view modes" > "Taxonomy term page" checkbox, but the display mode is still the previous configured one.
Repro:
1. I only set "Associated content display" to "hidden" in Taxonomy term page view mode, nothing else.
2. Uncheck the Taxonomy term page on Default view mode
3. Taxonomy Term page is still shown with "hidden" mode enabled.
I think this is wrong and should revert to core default as I have disabled it.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | taxonomy_display-disable_taxonomy_display__when_custom_display_disabled-1507630-6.patch | 794 bytes | codycraven |
Comments
Comment #1
codycraven commentedI agree, thank you for the report.
Comment #2
hass commentedIt's not only the disable logic. I believe the module code runs all times, configured or not. This may waste performance.
I guess the check need to go into
taxonomy_display_menu_alter(&$items), but I currently don't understand where to get a flag from; if this term is enabled for custom taxonomy displays or not.Comment #3
codycraven commentedhass,
The simplest solution would be to replace in taxonomy_display_fetch_taxonomy_display():
This:
With this:
Note that taxonomy_display does run on every taxonomy term page load. There's no way to selectively hook_menu_alter() on specific vocabularies.
Comment #4
lotyrin commentedI can confirm this. I agree that this is a usability issue.
I'm not concerned about any performance hit that checking like this will cause, it seems like it should be minor. If we find it's needed, we can add a layer of cache here at some point in the future.
Comment #5
codycraven commentedStill needs a patch to get RTBC.
Comment #6
codycraven commentedPlease review against 7.x-1.x.
Comment #7
lotyrin commentedComment #8
lotyrin commentedComment #9
lotyrin commentedCommitted to 7.x-1.x
Comment #10
lotyrin commentedWhile this is committed, it's introduced a problem.
On a fresh site, before any mode is either set or not set, field_view_mode_settings() will return an empty array. This causes a warning when we test for custom settings.
Comment #11
lotyrin commentedCommitted a fix.
Comment #12
lotyrin commentedAlso, now that this is in, anyone importing taxonomy_display settings via Features will also need to have exported their bundle settings for the vocabulary (this is a variable, so requires Strongarm) or have manually enabled the custom display for the exported taxonomy_display settings to have any effect.
Comment #13
codycraven commentedWe should probably document the Features export process (including the strongarm and manual option) in a new child page of: http://drupal.org/node/1254876 before the 1.1 release.