Problem/Motivation

With Commerce Backoffice Product enabled, the following notice appears on the add atom page (/atom/add):

Notice: Undefined index: page_arguments in theme_commerce_backoffice_product_node_add_list() (line 219 of /mnt/www/html/novogradacdev/docroot/sites/all/modules/contrib/commerce_backoffice/commerce_backoffice_product.module).

Proposed resolution

The reason this notice is being thrown is because commerce backoffice implements a theme_node_add_list to determine (based on the URL) whether it should display product node types or non-product display types. Commerce backoffice's implementation expects there to be a node type stored in $content['page_arguments']. This patch simply modifies scald's theme_node_add_list implementation to add the node type - atom - as a page_argument.

Remaining tasks

Please review this patch.

User interface changes

None.

API changes

None.

Comments

rvillan’s picture

Issue summary: View changes
rvillan’s picture

rvillan’s picture

Status: Active » Needs review
nagy.balint’s picture

This patch will work.

However for node/add/* links the page argument always contains the bundle name like "blog" or "page" and so on. and not "node".

So shouldnt the page argument for atom/add/* contain the $name, instead of a fix "atom"?

nagy.balint’s picture

Let me know if the attached patch still works for you.

  • nagy.balint committed 554c138 on 7.x-1.x
    Issue #2442187 by allez, nagy.balint: Notice: Undefined index:...
nagy.balint’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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