When adding links, this error keeps coming up in the log:

Warning: Missing argument 3 for _editor_advanced_link_attributes_validate() in _editor_advanced_link_attributes_validate() (line 134 of /var/www/html/vsac/modules/editor_advanced_link/editor_advanced_link.module).

Which corresponds with this code:

/**
 * Filter empty attributes to avoid empty HTML output.
 */
function _editor_advanced_link_attributes_validate($element, FormStateInterface $form_state, $form) { //Line 134
  $values = $form_state->getValue('attributes');
  $link_element = $form_state->get('link_element');
  foreach ($values as $key => $value) {
    if (empty($value)) {
      $form_state->setValue(['attributes', $key], '');
      // Special case on content creation.
      if (empty($link_element)) {
        $form_state->unsetValue(['attributes', $key]);
      }
    }
  }
}

The link attributes seem to be saving properly upon saving, and there are no empty attributes. Would like to resolve this so it doesn't keep popping up in the logs, though. Any ideas?

Comments

jkev created an issue. See original summary.

  • 846f44f committed on 8.x-1.x
    Issue #2823686 by jkev, DuaelFr: fix...
duaelfr’s picture

Version: 8.x-1.3 » 8.x-1.x-dev
Priority: Normal » Minor
Status: Active » Fixed

Thanks for reporting. That's now fixed.

Status: Fixed » Closed (fixed)

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