After working through #676010: diff_menu() issue - undefined offset in includes/menu.inc on line 576 function _menu_translate(), I traced some undefined offset errors to salesforce_api_menu(). It seems they were previously meant to be tabs, but are now used as callbacks.

Notice: Undefined offset: 4 in _menu_translate() (line 577 of .../includes/menu.inc).

Patch attached below.

Comments

lazysoundsystem’s picture

Status: Needs work » Active
StatusFileSize
new2.88 KB

Here's the patch

Edit: ignore this patch - I've just seen #1214076: "Notice: Undefined offset 4 in _menu_translate" because of the way that the fieldmap paths are defined which solves the problem much more elegantly for D7. I'll adapt that for D6 and post below.

aaronbauman’s picture

Status: Active » Needs work

From what I gather from #676010, the proper approach to solving this issue is to implement proper menu path args and respective *_to_arg() functions, and make sure the access callbacks are returning false when no arg is present.

Also, I'm not sure what any of this has to do with the menu title and description.
Those should not be removed.

lazysoundsystem’s picture

Status: Active » Needs work

Sorry, yes, as mentioned in the edit above, I'll prepare a better solution. Thanks for the quick response!

lazysoundsystem’s picture

Status: Needs work » Needs review
StatusFileSize
new12.54 KB
kostajh’s picture

This looks fine but I don't have time to test it. Has anyone else tested this patch?

kostajh’s picture

Status: Needs review » Closed (won't fix)
victoriachan’s picture

Status: Closed (won't fix) » Reviewed & tested by the community

We're using this on a client's production website. It's been working fine.

Thanks,
Victoria

aaronbauman’s picture

Component: salesforce_api » Code
Issue summary: View changes
Status: Reviewed & tested by the community » Closed (outdated)

closing all 6.x issues