Fragmented Thought

Drupal WYSIWYG Ad Block Breaks WYSIWYG When Advanced Link Is Selected



Lance Gliser

Heads up! This content is more than six months old. Take some time to verify everything still works as expected.

I was setting up a new site today for a client. I got caught up on the WYSIWYG install though. I selected loads of buttons from the profile, include "Advanced Link." I swapped over to begin testing out a new feature I was going to put in, and noticed the editor failed to load entirely.

I went through the standard Drupal checklist for WYSIWYG issues:

  • Check the WYSIWYG module is installed.
  • Check the format you want the editor for has a WYSIWYG profile associated.
  • Triple Check the files Drupal links to really are there.
  • Check the template to ensure it includes <?php print $scripts; ?> and <?php print $closure; ?>

After blowing through the standard items, I checked in different browsers. And up it came. So, a Firefox bug. I started looking around for known FF WYSIWYG bugs. Most of the complaints I found were akin to "Your custom Firefox profile takes too much memory, or is corrupted." The answer suggested? "Delete your profile." HA! Not without no other alternative. So, I began playing the hunt game disabling addons, which led me to Ad Block. And as I mouse over the little offending bastard, I see "One item blocked." Pressing Ctrl-Shift-V will open it if you like keybinds.

Blocked Item: `` Filter: `/[^a-zd=+%@](?!d{5,})(w*d+xd)?d*(show)?(w{3,}%20|alligator|avs|barter|blog|box|central|context|crystal|d?html|exchange|external|forum|front|fuse|gen|get|house|hover|http|i?frame|inline|instant|live|main|mspace|net|partner|php|popin|primary|provider|realtext|redirW.*W|rotated?|secure|side|smart|sponsor|story|text|view|web)?_?ads?(v?((ition|meta|tology3|versal).com|(marketplace|rom).net||bot|brite|broker|bureau|butler|cent(er|ric)|click|client|content|coun(cil|t(er)?)|creative|cycle|data(id)?|engage|entry|er(tisw+|t(pro)?|ve?r?)|farm|feelgood|force|form|frame(generator)?|gardener|gen|gif|groupid|head|ima?ge?|index|info|js|juggler|layer|legend|link|log|man(ager)?|max|mentor(serve)?|mosaic|net|new||optimi[sz]er|parser|peeps|pic|player|po(ol|pup|sition)|proof|q.nextag|re(dire?c?t?|mote|volver)|rotator|sale|script|search|sdk|sfac|size|so(lution|nar|urce)|stream|space|srv|stat.*.asp|sys|(tag)?track|trix|type|view|vt||zone))?s?d*(status)?d*(?!.org)[W_](?!w+.(ac.|edu)|astra|aware|adurl=|block|login|nl/|sears/|.*(&sbc|.(wmv|rm)))/` Filter Source: `Filterset.G`

So your options to fix it are:

  • Allow the exception to the filter (You blocked it, you should fix it.)
  • Alert the media, and hope Filterset.G doesn't tell you to take the above option.
  • Don't use Ad Block
  • Don't use Advanced Link

... Shucks