The Bundle drop-down select seems to be having trouble. On the Bundle Config page it doesn't actually cause the form to update with the values saved for the bundle. On the main Features listing it doesn't properly update the list right after a module is exported.

In debugging this, there is a strange case where Drupal calls the form build routine after using the Bundle selector *without* having the form_state->getTriggeringElement set. Looking in the form_state I see the _triggering_element_name in the Input array set. After calling the build without the TriggeringElement it then calls the build function a second time with TriggeringElement set.

This seems to only happen the first time after a page is loaded. Subsequent changes to the bundle dropdown only call the build once with TriggeringElement set.

I need to search the Drupal Core issue queue to see if this is a known issue with Ajax. I don't remember seeing this in 8.0-beta9 so it might be a regression. Tough one to debug though.

I think I've improved the Ajax code and gotten this working now, so a Patch is coming.

Comments

mpotter’s picture

Status: Active » Needs review
StatusFileSize
new6.51 KB

Here is the patch

mpotter’s picture

Status: Needs review » Fixed

Committed to 3b9632a.

  • mpotter committed 3b9632a on 8.x-3.x
    Issue #2535264 by mpotter: Ajax not working properly on Bundle dropdown
    

Status: Fixed » Closed (fixed)

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