The current state of the 7.x-1.x branch breaks the modal forms.

It looks mainly like the additions in commit 27ac0352d286407d9a5ad93be9bb60ab22d8678f. I know some were fixed in a more recent commit, however there are still some issues.

It primarily looks like it's the use of "$this" in line# 92 in "flexiform.flexiform.inc":

/**/
elseif ($this->configuration['ajax_behavior'] == 'modal_dismiss') {
/**/

In order to get the ajax_behavior info from the $flexiform object, we need to know the current display. I suggest that gets passed into the flexiform_modal_wrapper from the add_modal_display.inc's build() function.

Change:

    $args = isset($context['args']) ? $context['args'] : array();
    array_unshift($args, $base_entity);
    array_unshift($args, $this->flexiform);
    return call_user_func_array($wrapper, $args);

To include the calling class:

    $args = isset($context['args']) ? $context['args'] : array();
    array_unshift($args, get_class($this));
    array_unshift($args, $base_entity);
    array_unshift($args, $this->flexiform);
    return call_user_func_array($wrapper, $args);

I'll provide a patch shortly.

Comments

cravecode created an issue. See original summary.

cravecode’s picture

Assigned: cravecode » Unassigned
Status: Active » Needs review
StatusFileSize
new2.38 KB

Attaching patch.

rlmumford’s picture

Status: Needs review » Fixed

Thanks @cravecode

  • rlmumford committed e53e434 on 7.x-1.x authored by cravecode
    Issue #2917694 by cravecode: Modal work in progress, breaks modal in 7.x...

Status: Fixed » Closed (fixed)

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