Notice in Log.

Steps to reproduce:

1) Install and enable Customer Profile Type UI (7.x-1.x)

2) Install and enable Commerce RMA (7.x-2.x)

3) See log: "Notice: Undefined index: module in customer_profile_type_ui_menu() (line 42 of /Volumes/arquivos/projects/Drupal_DCOH/Drupal/sites/all/modules/customer_profile_type_ui/customer_profile_type_ui.module)."

Image:
Image

Comments

renatog created an issue. See original summary.

renatog’s picture

Status: Active » Needs review
StatusFileSize
new708 bytes

In attached is the patch with the fix.

cebasqueira’s picture

StatusFileSize
new32.65 KB

Works look good!

cebasqueira’s picture

Assigned: renatog » Unassigned
Status: Needs review » Reviewed & tested by the community
larruda’s picture

Maintainers was notified by email.

acrazyanimal’s picture

No. It is not "good". Really it is the commerce_rma module that should be fixed. It is providing insufficient info when defining its profile type. I don't believe in fixing an issue by simply ignoring the real problem.

First of all commerce_rma in its commerce_return sub-module, which is what I'm assuming is actually the source of this issue, should be using hook_commerce_customer_profile_type_info() instead of the alter hook for providing info about a new customer profile type. This way it wouldn't have missed adding in the 'module' parameter. Secondly if it needs to use the alter hook, which it doesn't, it SHOULD be ensuring it adds all of the default parameters that are expected by commerce as you can easily find in commerce_customer_profile_types() and which the code you fixed in this module clearly calls.

If you absolutely cannot get this fixed in the commerce_rma module then I will give in and commit this, but shouldn't have to, don't want to, and am frankly annoyed by such an issue.

larruda’s picture

Status: Reviewed & tested by the community » Needs work

So it needs some work...

acrazyanimal’s picture

@larruda I was going to put it as "closed - won't fix" but I can wait to see if you get it fixed in the commerce_rma first. There is no work to be done for this module or issue patch. The patch is fine the way it is, but it is unnecessary because by definition the profile type info should have the 'module' parameter. The fact that you are running into this issue is because the commerce_return sub-module does not populate that required default parameter.

cesarromagnolo’s picture

Assigned: Unassigned » cesarromagnolo
Status: Needs work » Closed (won't fix)

This bug occurs in commerce_rma (stable version) not in customer_profile_type_ui, but in dev-version of commerce_rma this bug was fixed.

cesarromagnolo’s picture

I Use Customer Profile Type UI (7.x-1.0) and Commerce RMA (7.x-2.0-rc2+25-dev)

larruda’s picture

@acrazyanimal I guess you can close this as won't fix then, as you planned. I'm not sure if it counts credit towards issues closed with that status, but just in case please give the proper credit to the guys here that spent their time to look at the issue. Thanks a have a great week!

acrazyanimal’s picture

Good God .. unbelievable! You'll get credit if a patch you create for a module is committed. Now that I think of it, you should add me to the 'Credit others' input when you create the patch for the commerce_rma module. After all I did point you guys in the right direction. Yes, I believe you MUST do this! If you don't you'll just be lying to yourselves. lol I'll be watching for my notification. ;)

botris’s picture

I've created a patch at #2670128: Notice: Undefined index... which should solve the problem in the module itself.
Also raised an issue to move the profile creation to hook_commerce_customer_profile_type_info at #2854171: Commerce profiles should use hook_commerce_customer_profile_type_info