Unfortunately this module can't do its work when Taxonomy translation module (part of the i18n package) enabled. i18n_taxonomy.pages.inc overrides it.

(Thanks for the report function built in the dev version - it was easy to find the override with it!)

Comments

blacksnipe’s picture

+1! Did you manage to fix it, Thamas?

thamas’s picture

Unfortunately not. If I was able I had sent a patch… :(

modestmoes’s picture

Both the i18n_taxonomy module and disable_term_node_listing module use the same approach. My guess is that the hook_menu_alter functions get called alphabetically and i18n_taxonomy rewrites the _alter that is done in disable_term_node_listing.

An alternative module that does something similar but doesn't conflict.

https://drupal.org/project/taxonomy_display

chris.smith’s picture

Assigned: Unassigned » chris.smith
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.08 KB

Came across this issue while working on a client project. Here is a patch that moves the menu_alter hook to the last position, so it executes after i18n. Implements hook_module_implements_alter.

strykaizer’s picture

I can confirm #4 solves the incompatibility with i18n_taxonomy.

Please commit ;)

kpaxman’s picture

Status: Needs review » Reviewed & tested by the community

I am not using the i18n_taxonomy module, but this module wasn't working at all for me, similar to this issue. Installing the patch from #4 fixed it.

strykaizer’s picture

Hmm, seems like this module also uses the wrong Term name language for translated terms. (drupal_set_title on line 37)

sheijtel’s picture

We use i18n_taxonomy and the path from #4 has fixed this issue.

  • 50fa716 committed on 7.x-1.x
    #1936304 by akeemw, OPIN: Allow this module to work in conjunction with...
akeemw’s picture

Assigned: chris.smith » akeemw
Status: Reviewed & tested by the community » Needs review

Experimental support for i18n Taxonomy has been committed to 7.x-1.x-dev branch but needs review an testing before I can release it as a new version.

Ultragiga’s picture

I can hereby confirm that patch #4 works. The thing to remember is that if you want to disable taxonomy term pages is to set the Display 404 or 403 Page option because setting the Disable node listing for all terms has seemingly no effect at all.

Cheers for submitting this wonderful patch!

marcvangend’s picture

This solution does not really work, at least not with localized terms. The patch only makes sure that this module takes priority over i18n_taxonomy. What we (or at least: I) really need, is that the two modules play nice together.

The easiest way to achieve this, is to make Disable Term Node Listings translate/localize the term before doing anything else with it, just like i18n_taxonomy_term_page() does. See the patch attached; this should be applies in combination with the patch from #4.

Maybe, a better approach (but a much larger change to this module) would be for Disable Term Node Listings to not define its own menu callback, but only alter the page content as built by other modules, removing the listing.

marcvangend’s picture

PS.

+++ b/disable_term_node_listings.module
@@ -120,3 +120,19 @@ function disable_term_node_listings_taxonomy_vocabulary_update($vocabulary) {
+    // Move my_module_rdf_mapping() to the end of the list. module_implements()

This comment was copied from the API documentation, but "my_module_rdf_mapping" is incorrect of course. It should refer to the disable_term_node_listings_menu_alter().

eeg’s picture

The patch #4 can cause problems with other modules, for example Elysia Cron, that don't expect an empty menu item array in their menu_alter implementation. Therefore I've attached a patch for the current dev branch that uses a complete menu item array, just with the items unset that need to be checked for alterations.

miiimooo’s picture

StatusFileSize
new856 bytes

Here is a different patch that uses `hook_module_implements_alter`