I'm getting these errors in a fresh d7 dev installation:

    Notice: Undefined index: access callback in translation_menu() (line 170 of /var/www/d7test/sites/all/modules/translation/translation.module).
    Notice: Undefined index: access arguments in translation_menu() (line 170 of /var/www/d7test/sites/all/modules/translation/translation.module).
    Warning: array_merge(): Argument #2 is not an array in translation_menu() (line 170 of /var/www/d7test/sites/all/modules/translation/translation.module).

Let me know what extra info you need to troubleshoot this.

Comments

klonos’s picture

...still getting this in both D7b2 and latest D7 dev. Any clues?

adjtifrice’s picture

Same here, also on a clean D7 install; I'm willing to send any additional info you may need to troubleshoot this, or have a look myself if you can point me in the general direction of what causes the problem...

plach’s picture

I'll give this a look asap.

klonos’s picture

Thanx Francesco.

klonos’s picture

Any news here? Could this be a php 5.3.x issue?

pcambra’s picture

suscribe

plach’s picture

@klonos:

I'm not able to reproduce the issue, do notices show up after installation? I'm using PHP 5.2 so maybe it's a 5.3 issue, I'll try to verify this when I have the chance.

klonos’s picture

Status: Active » Postponed (maintainer needs more info)

Thanx Francesco. I'll see if I can setup a server with php 5.2 and test too - just to be sure. I just need to find some time.

good_man’s picture

This error appears when you enable the taxonomy translation in (admin/config/regional/translation).

WilliamV’s picture

any updates on this one?

klonos’s picture

I still didn't manage to make some time to setup a php 5.2 server and test this. I do want to do it, but real life is always catching up. Sorry.

good_man’s picture

steps to reproduce:
- clear the cache (especially menu)
- visit the page (admin/config/regional/translation)

as far as I see it taxonomy module doesn't load the access callback & access arguments yet in translation. try printing entity_get_info() and check taxonomy_term -> translation array vs. node -> translation for example, no access keys yet.

I'll try to digg more to find out why taxonomy is not loading it at hook_menu, NOTE that if you print the entity info in hook_init the access keys are loaded.

good_man’s picture

Title: Undefined index access callback/arguments in translation_menu() (line 170 of translation.module) » Undefined index access callback/arguments in translation_menu
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.18 KB

This extra check will make sure it won't load it until the callback is there.

good_man’s picture

StatusFileSize
new1.21 KB

comment on col #80 wrapping, sun doesn't like that :)

jelenex’s picture

Same problem here on php 5.3, the patch #14 seems to fix it.
Thanks

plach’s picture

Project: Content translation » Entity Translation
Version: 7.x-2.x-dev » 7.x-1.x-dev
mattcasey’s picture

I get index errors enabling either this module or Taxonomy Translation

fietserwin’s picture

Using the debugger, on saving the settings of page "admin/config/regional/entity_translation", the function entity_translation_menu() is visited twice:

First time with this stack trace:

http://localhost/project/index.php?q= (suspended at line breakpoint )	
	menu_router_build(): sites/all/modules/entity_translation/entity_translation.module at line 128	
	menu_router_build(): includes/menu.inc at line 2619	
	menu_get_router(): includes/menu.inc at line 2654	
	entity_translation_entity_info_alter(): sites/all/modules/entity_translation/entity_translation.module at line 77	
	drupal_alter(): includes/module.inc at line 1002	
	entity_get_info(): includes/common.inc at line 7243	
	field_group_menu(): sites/all/modules/field_group/field_group.module at line 42	
	menu_router_build(): includes/menu.inc at line 2619	
	menu_rebuild(): includes/menu.inc at line 2588	
	entity_translation_admin_form_submit(): sites/all/modules/entity_translation/entity_translation.admin.inc at line 49	
	form_execute_handlers(): includes/form.inc at line 1390	
	drupal_process_form(): includes/form.inc at line 830	
	drupal_build_form(): includes/form.inc at line 350	
	drupal_get_form(): includes/form.inc at line 188	
	menu_execute_active_handler(): includes/menu.inc at line 501	
	index.php at line 22	

variable info:

$entity_type	(string:13) taxonomy_term	
$info	Array [15]	
	label	(string:14) Taxonomie term	
	controller class	(string:22) TaxonomyTermController	
	base table	(string:18) taxonomy_term_data	
	uri callback	(string:17) taxonomy_term_uri	
	fieldable	(boolean) true	
	entity keys	Array [4]	
	bundle keys	Array [1]	
	bundles	Array [4]	
	view modes	Array [1]	
	static cache	(boolean) true	
	field cache	(boolean) true	
	load hook	(string:18) taxonomy_term_load	
	translation	Array [1]	
		entity_translation	Array [2]	
			base path	(string:28) taxonomy/term/%taxonomy_term	
			alias	(boolean) true	
	schema_fields_sql	Array [1]	
	token type	(string:4) term

Second time with this stack trace:

http://localhost/project/index.php?q= (suspended at line breakpoint )	
	menu_router_build(): sites/all/modules/entity_translation/entity_translation.module at line 128	
	menu_router_build(): includes/menu.inc at line 2619	
	menu_rebuild(): includes/menu.inc at line 2588	
	entity_translation_admin_form_submit(): sites/all/modules/entity_translation/entity_translation.admin.inc at line 49	
	form_execute_handlers(): includes/form.inc at line 1390	
	drupal_process_form(): includes/form.inc at line 830	
	drupal_build_form(): includes/form.inc at line 350	
	drupal_get_form(): includes/form.inc at line 188	
	menu_execute_active_handler(): includes/menu.inc at line 501	
	index.php at line 22	

variable info:

$entity_type	(string:4) node	
$info	Array [16]	
	label	(string:4) Node	
	controller class	(string:14) NodeController	
	base table	(string:4) node	
	revision table	(string:13) node_revision	
	uri callback	(string:8) node_uri	
	fieldable	(boolean) true	
	entity keys	Array [5]	
	bundle keys	Array [1]	
	bundles	Array [4]	
	view modes	Array [3]	
	static cache	(boolean) true	
	field cache	(boolean) true	
	load hook	(string:9) node_load	
	translation	Array [2]	
		locale	(boolean) true	
		entity_translation	Array [11]	
			class	(string:28) EntityTranslationNodeHandler	
			alias	(boolean) true	
			access callback	(string:34) entity_translation_node_tab_access	
			access arguments	Array [1]	
			base path	(string:10) node/%node	
			view path	(string:10) node/%node	
			edit path	(string:15) node/%node/edit	
			path wildcard	(string:5) %node	
			theme callback	(string:12) variable_get	
			theme arguments	Array [1]	
			edit form	(boolean) true	
	schema_fields_sql	Array [2]	
	token type	(string:4) node	

So, obviously it is the first pass, that is unexpected and is giving the notices. The menu rebuild seems to be forced by the field_group module. If this module is enabled, the error is consistently reproducable.

Hope this helps.

fietserwin’s picture

StatusFileSize
new1.03 KB

Patch from #14 adapted to match new module name

plach’s picture

StatusFileSize
new2.33 KB

The attached patch should fix the issue in a more reliable way.

mattcasey’s picture

Not getting errors anymore after patch in #20 :)

plach’s picture

Status: Needs review » Reviewed & tested by the community
plach’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pcambra’s picture

Status: Closed (fixed) » Active
StatusFileSize
new66.54 KB

Hi

When installing from an install profile I get the same errors than the original post but in line 174 when the site has been installed, at the last screen that says Visit your new site.

No error at any other place.

klonos’s picture

...which install profile do you use Pedro?

pcambra’s picture

It is a custom one that enables entity translation by default

plach’s picture

Status: Active » Postponed (maintainer needs more info)

Please, we really need to know how to reproduce this.

plach’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Closing the issue. Feel free to reopen if you can provide the steps to reproduce it.

  • Commit 80e92c9 on master, et-permissions-1829630, factory, et-fc, revisions by plach:
    #936646 by good_man, fietserwin, plach, klonos: Fixed Undefined index...

  • Commit 80e92c9 on master, et-permissions-1829630, factory, et-fc, revisions, workbench by plach:
    #936646 by good_man, fietserwin, plach, klonos: Fixed Undefined index...