Hi,

I encountered an issue that has been the origin of a ticket in WYSIWYG module issues.

On saving Text format, I get an error: "Invalid domain default. Please, enter a comma separated list of valid domain names."

I didn't know where it came from because I've got only some few filters activated.
When I look at the code, I found the origin of the message in the WYSIWYG Filter module, wysiwyg_filter.admin.inc:

  // *** validate nofollow_domains ***
  $nofollow_domains = array_filter(explode(',', preg_replace('#\s+#', ',', $values['nofollow_domains']))); // form2db
  foreach ($nofollow_domains as $nofollow_domain) {
    if (!preg_match('#^([a-z0-9]([-a-z0-9]*)?\.)+([a-z]+)$#i', $nofollow_domain)) {
      form_set_error('nofollow_domains', t('Invalid domain %domain. Please, enter a comma separated list of valid domain names.', array('%domain' => $nofollow_domain)));
    }
  }

There is a field in WYSIWYG Filter module with the parameter that generate this error:
WYSIWYG nofollow parameter

Even if WYSIWYG filter IS NOT activated, the message appear!

I didn't know if this "default" value is a value provided by the module after install, or if it depends on our installation, but the person who create this ticket get the same errors as me and nobody were able to reproduce it.

So :

  1. this value should be empty by default ;
  2. the validation should not trigger if we do not activate this filter (already reported, patch not ported to RC).

Simple solution that worked for me:

  1. check the WYSIWYG Filter,
  2. empty the field,
  3. uncheck the filter,
  4. save.

Best regards

Comments

mattew’s picture