Due to the refactoring in #1919142: Convert Views UI AJAX forms to use FormInterface nothing is stored when you change anything on handlers UI.

Reproduce:

  • Add a field
  • Create a label, hit apply and go back to look whether it got saved
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

I tracked it down to the following line:

call_user_func($submit_handler, $form, $form_state);

with submit_handler containing the proper information, but ConfigItem::submitForm() is simply not called :(

dawehner’s picture

Priority: Critical » Major

This should be probably major.

webchick’s picture

Issue tags: +Needs tests

:(

dawehner’s picture

Status: Active » Needs review
FileSize
666 bytes

Here is a fix, but I'm not really sure why this works and the previous code does not.

Fact is, we have test coverage for simply stuff like that, but maybe the tests work slightly different?

Warning this patch size is 666 bytes, so this might be caught by php 5.4 :P

olli’s picture

FileSize
656 bytes

Can't reproduce with 5.3.10.

Does this work for you?

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Yeah your last patch works as well, see the comment about it on http://php.net/manual/en/function.call-user-func-array.php

dawehner’s picture

Let's do that now, and maybe later switch to just use the method call.

catch’s picture

Status: Reviewed & tested by the community » Needs work

Hmm I think I agree with webchick that this needs tests.

dawehner’s picture

Well I agree it would be great if we could have tests for that, but how can we test code, which just works on a certain php version, and not on a newer version?

The current code in core works fine in php 5.3, but not in php 5.4.

catch’s picture

Ahh that's a good point. Could do with a comment though explaining why call_user_func_array() is necessary.

dawehner’s picture

Status: Needs work » Needs review
FileSize
863 bytes

So this time with a new comment?

andymartha’s picture

FileSize
130.87 KB

With a fresh Drupal 8.x-dev installation on March 6, 2013, and with the patch drupal-1933290-12.patch on #12 on PHP 5.4, Views still gives AJAX errors. If you would like me to test or give input in different ways/different setups, let me know! :) See screenshots.

dawehner’s picture

@andymartha
I can't reproduce that, but yeah maybe open another issue and describe how to reproduce this problem.

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

This works beautifully. Let's get it in.

andymartha’s picture

@dawehner
So sorry, I was making a custom module that made ajax errors not related to this. The patch drupal-1933290-12.patch works.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

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