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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | page-arguments-in-theme-commerce-backoffice-2442187-5.patch | 438 bytes | nagy.balint |
Comments
Comment #1
rvillan commentedComment #2
rvillan commentedComment #3
rvillan commentedComment #4
nagy.balint commentedThis 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"?
Comment #5
nagy.balint commentedLet me know if the attached patch still works for you.
Comment #7
nagy.balint commentedCommitted.