Hi all,

Recent log entries report this error on my site :

require_once(sites/all/modules/apachesolr/i18ntaxonomy.pages.inc)
[function.require-once]:
failed to open stream:
No such file or directory in /home/drupal/drupal/includes/menu.inc on line 346.

In fact i18ntaxonomy.pages.inc isn't located here
sites/all/modules/apachesolr/i18ntaxonomy.pages.inc
but here
sites/all/modules/i18n/i18ntaxonomy/i18ntaxonomy.pages.inc

Thx for your great module

Comments

janusman’s picture

Assigned: Unassigned » janusman

I think this happens when you have the i18ntaxonomy module enabled along with Apache Solr's "use Apache Solr for taxonomy links" option.

If you're using both, the workaround is: use only one of them, or change i18ntaxonomy.module replacing the function i18ntaxonomy_menu_alter() with this one:

/**
 * Implementation of hook_menu_alter().
 *
 * Take over the taxonomy pages
 */
function i18ntaxonomy_menu_alter(&$items) {
  // Taxonomy term page. Localize terms.
  // COMMENTED Following lines
  //$items['taxonomy/term/%']['module'] = 'i18ntaxonomy';
  //$items['taxonomy/term/%']['page callback'] = 'i18ntaxonomy_term_page';
  //$items['taxonomy/term/%']['file'] = 'i18ntaxonomy.pages.inc';
  //$items['taxonomy/term/%']['file path'] = drupal_get_path('module', 'i18ntaxonomy'); 

  // Localize autocomplete
  $items['taxonomy/autocomplete']['module'] = 'i18ntaxonomy';
  $items['taxonomy/autocomplete']['page callback'] = 'i18ntaxonomy_autocomplete';
  $items['taxonomy/autocomplete']['file'] = 'i18ntaxonomy.pages.inc';
  // ADDED following line
  $items['taxonomy/autocomplete']['file path'] = drupal_get_path('module', 'i18ntaxonomy');
}

Hope this helps!

janusman’s picture

I think this is a "won't fix", because it's an i18n module problem...

@pwolanin? @robertDouglass?

See: #386136: i18n_taxonomy weight needs to be lower than views which will probably fix the problem.

srobert72’s picture

I use :
apachesolr 6.x-1.x-dev (2009-Aug-15)
i18n 6.x-1.x-dev (2009-Aug-30)

So this patch #386136: i18n_taxonomy weight needs to be lower than views is deployed on my site. But problem remains.

janusman’s picture

@srobert72: Did you try the changes in comment #1?

srobert72’s picture

@janusman #4: No not yet. I'm not fan with patching manually because next update will overwrite it. I thought this patch could be include in dev release.

Do you want me to test this solution #1 to review it ?

If I desactivate i18ntaxonomy, will apachesolr do same feature ? Will taxonomy links be translated as with i18ntaxonomy ? If not, desactivate i18ntaxonomy can't be a solution in my opinion.

Scott Reynolds’s picture

The problem is both modules menu_alter() right. And that messes things up. And because i18n taxonomy is alphabetically listed after apachesolr, it gets to edit the menu item last. If you apply that patch #386136: i18n_taxonomy weight needs to be lower than views it only emphasizes that point. Both menu_alter()'s collide.

Afraid the combination of features you want will not come without some work, no combination of modules gets you what you want.

Not sure its really an i18n issue though janusman. I think it speaks to being careful with menu_alter's. Solr needs to be smarter about this.

robertdouglass’s picture

Status: Active » Closed (won't fix)

Scott's point in #6 stands, but won't fix on the basis of this collision alone. We can open a more general issue to make the menu_altering more sane, in a broader context.

idcm’s picture

We just experienced the same error (suddenly). We had been doing okay before today and we got the error. Any idea what triggers the error to occur? I am guessing something processed someplace. Anyone know? Just curious.

Undoing the solr setting didn't do the trick. We had to undo both. Will look at the patches to see if that is where we want to go.

colan’s picture

Assuming that this is the same problem, I posted the solution over at https://drupal.org/node/693720#comment-3315352. Let's try setting the weight of this module higher (than i18ntaxonomy) and see if that works. If so, we can patch it.

colan’s picture

Status: Closed (won't fix) » Active
yngens’s picture

same issue here. subscribing

feuillet’s picture

same issue here. subscribing. #1 hasn't solved the problem.

jpmckinney’s picture

Issue tags: +taxonomy hijack
pwolanin’s picture

Status: Active » Closed (fixed)

Looks like the fix is to set module weights - that's a site-specific hack in general

nedjo’s picture

Status: Closed (fixed) » Closed (duplicate)

Tweaking module weights might avoid the problem, but it's caused by the issue noted in #979194: Missing 'module' element in menu_alter for taxonomy hijack.

gustavol’s picture

Hi, same problem here with apachesolr and i18taxonomy
solved changing solr modules and their contribs from weight 0 to 6. i18taxonomy remains with 5.
no side effects by the moment.
thanks
Gustavo

gustavol’s picture

Hi, today, apache solr multigual broke my site. I'm sure the "priority game" will save the problem, but, by the moment, I've no time to go through. I'll back!
thanks
Gustavo