Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #134: Fix broken views override in i18n_taxonomy since core 1.28 #135

Merged
merged 3 commits into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions i18n_taxonomy/i18n_taxonomy.module
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ function i18n_taxonomy_admin_paths() {
* Take over the taxonomy pages.
*/
function i18n_taxonomy_menu_alter(&$items) {
// If ctool's page manager is active for the path skip this modules override.
// Also views module takes over this page so this won't work if views enabled.
// Skip when taxonomy_display enabled, see http://drupal.org/node/1280194
if (!module_exists('taxonomy_display')) {
// When views overrides this path, the item for this path at this point is
// NULL since core 1.28.0 because of changed hook order.
// The isset check does no harm with prior Backdrop versions, but not checking
// it would break all term pages as of core 1.28.
// @see https://github.com/backdrop-contrib/i18n/issues/134
if (!module_exists('taxonomy_display') && isset($items['taxonomy/term/%taxonomy_term'])) {
// Taxonomy term page. Localize terms.
$items['taxonomy/term/%taxonomy_term']['page callback'] = 'i18n_taxonomy_term_page';
$items['taxonomy/term/%taxonomy_term']['title callback'] = 'i18n_taxonomy_term_name';
Expand Down