(Fixed in 7.x-1.2)

I've just upgraded from 7.x-1.1-beta1 to 7.x-1.1 and got 2 problems on 2 different sites.
1st site:

Fatal error: Class 'spamspan_admin' not found in [...]\sites\all\modules\spamspan\spamspan.module on line 43.

2nd site:
site's JS crashes with syntax error.

Disabling Spamspan filter or reverting to 7.x-1.1-beta1 make these problems disappear.

Comments

thomas schuh’s picture

update from 7.x-1.1-beta7 to 7.x-1.1 and same effect all js crashes.
revert to 7.x-1.1-beta7 solve the problem.

roball’s picture

Priority: Major » Critical

Same here. After upgrading SpamSpan filter from 7.x-1.1-beta7 to 7.x-1.1 all JavaScript is broken. The last "good" version from the November 2014 updates is 7.x-1.1-beta6, afterwards, a lot of "undocumented" and bad changes have been made, which also introduced some bugs. I would recommend to revert all changes since beta6 and release that as 7.x-1.2 asap.

peterx’s picture

"Fatal error: Class 'spamspan_admin' not found"
That is mentioned in another issue. Due to a limitation of Drupal's registry, switch off the module before the upgrade, upgrade the code, then switch the module back on.

Drupal does not have anything I have found for handling the deletion of classes. I guess you could leave a dummy class in place for several relases then delete the dummy class and hope every has applied every release.

peterx’s picture

Re Javascript. The Javascript is working at several sites in several browsers.

* What is the error? Please use Firebug or equivalent to display the error.

* Which browser, version, and OS?

Please test your browsers with the admin page.

Chrome is a pain at the moment because the Javascript is unreliable and changes almost every day. The Javascript was tested with a recent Chrome but not today's Chrome.

The Javascript in Safari produces inconsistent results. Some tests were performed with versions of Safari. I do not have the machines here to check which versions.

IE support is limited to whatever is supported by the jQuery in Drupal. We tested on one site using a Zen based theme and Zen adds some IE fixup code.

roball’s picture

Sorry that I do not currently have the time to debug the errors. I can ensure that with 7.x-1.1, the JS was broken with all current versions of the major browsers (FF, IE and Chrome) on Windows 7.

indigoxela’s picture

The syntax error issue is related to https://www.drupal.org/node/2200775#comment-9379049

As a workaround you can adapt the filter settings for the text formats using spamspan.
Setting "Replace dots in email with text" to on makes javascript work again.

The fatal error did not occur on my sites.

jdanthinne’s picture

anrikun’s picture

A workaround is not a solution. As rollbal said, 7.x-1.1-beta6 worked perfectly. Why not reverting the changes that introduced this bug?

indigoxela’s picture

Comment https://www.drupal.org/node/2200775#comment-9379049 is not about a workaround, but a solution in javascript code.

The workaround in filter settings is a quick fix to prevent broken javascript on live sites, without the need of patching anything.

peterx’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

7.x-1.2 contains the js change from https://www.drupal.org/node/2200775#comment-9379049. I am no longer working on a site using Spamspan so that is the last change from me.