Issue #28 and commit 66d3b723 causes Node context negotiation to fail due to comparison between menu router path (pattern) and path instance:
if (strpos(current_path(), $path) === 0) {
For nodes this result in comparison between e.g. node/1107 and node/%.
Proposed resolution
One of:
Revert
As explained in #28, the call to menu_get_item() may result in a new/nested call to og_context() due to menu router item object loading and translation. But one cannot compare a menu item path with a live path due to the above comparison failure, so you have to retrieve the menu router item from the current live path somehow. One solution is to implement a truncated version of menu_get_item() that halts processing the router item before item translation and object loading. It's only used to compare string. Leave it to the negotiation implementations to further check access control.
Problem / Motivation
Issue #28 and commit 66d3b723 causes Node context negotiation to fail due to comparison between menu router path (pattern) and path instance:
For nodes this result in comparison between e.g.
node/1107
andnode/%
.Proposed resolution
One of:
menu_get_item()
may result in a new/nested call to og_context() due to menu router item object loading and translation. But one cannot compare a menu item path with a live path due to the above comparison failure, so you have to retrieve the menu router item from the current live path somehow. One solution is to implement a truncated version ofmenu_get_item()
that halts processing the router item before item translation and object loading. It's only used to compare string. Leave it to the negotiation implementations to further check access control.