The function commerce_pdm_form_commerce_product_ui_product_form_alter overwrites any existing #after_build callbacks when it adds it's own callback. It would be nicer if it would just add to the array of callbacks instead.

The code is:
// Add JavaScript used by form.
$form['#after_build'] = array('_commerce_pdm_product_form_reference_attach');

CommentFileSizeAuthor
#2 form_after_build_fix-1418736-2.patch855 bytesdenes.szabo

Comments

amateescu’s picture

Project: Commerce Core » Commerce (Product Display Manager)
Version: 7.x-1.2 » 7.x-1.x-dev
Component: Product » Code
Category: feature » bug

Moving to the Commerce (Product Display Manager) queue.

denes.szabo’s picture

Status: Active » Needs review
StatusFileSize
new855 bytes

Patch attached.

I amended the code to this:
$form['#after_build'][] = '_commerce_pdm_product_form_reference_attach';

netsensei’s picture

Status: Needs review » Fixed

No brainer. :-)

http://drupalcode.org/project/commerce_product_display_manager.git/commi...

Fixed in dev! Thanks for contributing!

Status: Fixed » Closed (fixed)

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