For a node edit form, the actions are converted into a dropdown menu and then preprocessed by bootstrap.

There appears to be a bug in the release of 3.8 that prevents dropdown submit buttons from being clickable, what I've narrowed it down to is this commit:
http://cgit.drupalcode.org/bootstrap/commit/?id=315fdb5

From what I can tell so far, with this change:

-          $items->$key->element = $child->addClass('hidden')->getArrayCopy();
+          $element = $child->addClass('hidden')->getArrayCopy();

$element is the last referenced element of the foreach previously run:

foreach ($variables->links as &$element) {

So it seems to be overriding, in this case, the actual submit element which then doesn't show up in the HTML. It's supposed to be hidden, and then the dropdown code is supposed to trigger it, which is why it's just unclickable.

I don't have a patch yet because I want to understand the full context of the intended change, but I thought I'd share where I got so far.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

asherry created an issue. See original summary.

asherry’s picture

asherry’s picture

Status: Active » Needs review
FileSize
1.04 KB
3.48 KB

Ok I think the issue is that the code here:

$items->$key = $child->getArrayCopy();

...is actually overriding the original element which previously was getting populated as $items->$key->element. I have two patches that work for me though I admit I have not tested the actual translation functionality that this was originally intended to fix. That should definitely be done as well.

If this change works, I included two versions, 1 is if you revert the original commit and post a new commit, and the other patch is if you just want to make a fix commit.

markhalliwell’s picture

Assigned: asherry » Unassigned
Priority: Normal » Major
FileSize
1.42 KB

I think I accidentally overlooked this when I was stepping through because of #2068063: Change "Save and keep un-/published" buttons to a "Published" checkbox and an included "Save" button.

I had to install https://www.drupal.org/project/publishing_dropbutton which adds the dropbuttons back to the node add/edit forms and allowed me to step through this again.

This patch should fix the problem. If it does, let me know and I'll commit and release because this is a pretty major break (unfortunately).

asherry’s picture

Yeah we have the publishing_dropbutton module installed, so that makes sense.

This patch seems to work now, I imagine you also can delete the code on line 142:

$child->setAttribute('id', $id);

because you're re-setting the $child variable into a new element anyway. That was confusing me a bit.

Thanks so much for looking at that, and especially so fast. Either way I'll mark this as RTBC.

asherry’s picture

Status: Needs review » Reviewed & tested by the community
markhalliwell’s picture

Status: Reviewed & tested by the community » Fixed
FileSize
2.02 KB

I imagine you also can delete the code on line 142:

Actually, no that's also a bug :D That logic is still needed, but should be done before the original element is added to the items list.

  • markcarver committed bdab5ad on 8.x-3.x
    Issue #2938198 by markcarver, asherry: Dropdown unclickable for form...

Status: Fixed » Closed (fixed)

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