Problem/Motivation

I'm trying to add a button for an ajax call and it's failing because of several arrays not existing in this module. I went through and added checks for anything creating an error in my ajax call and make sure it returns something.

Steps to reproduce

If you add an ajax button via a hook_form_alter() and then press it, it'll list out these errors in the console.

See patch in the first comment.

CommentFileSizeAuthor
#5 3423539-5.patch2.25 KBowenbush
#2 3423539-1.patch2.65 KBprotitude

Comments

protitude created an issue. See original summary.

protitude’s picture

StatusFileSize
new2.65 KB
protitude’s picture

Issue summary: View changes
owenbush’s picture

Thanks for submitting the issue and patch. I'll take a look.

owenbush’s picture

Status: Active » Needs review
StatusFileSize
new2.25 KB

I've attached a newer version of the patch that uses PHP's Null Coalescing Operator (https://www.php.net/manual/en/migration70.new-features.php#migration70.n...) to make these changes more simple.

Please let me know if this patch still fixes these issues for you.

protitude’s picture

Thanks for the quick response! I applied your patch and everything still works as expected.

mrweiner’s picture

Status: Needs review » Reviewed & tested by the community

#5 works for me

  • owenbush committed 2c8a85d8 on 2.0.x
    Issue #3423539 by protitude, owenbush, mrweiner: Add checks for missing...
owenbush’s picture

Status: Reviewed & tested by the community » Fixed

This has been merged. Thank you to all involved.

Status: Fixed » Closed (fixed)

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