When Typogrify is setup as an Input Filter, and I navigate to a page which uses the associated Input Format, I get an error:

"Fatal error: Cannot redeclare smartypants() (previously declared in /.../sites/all/modules/smartypants/smartypants-php/SmartyPants-PHP.inc:79) in /.../sites/all/modules/typogrify/smartypants.php on line 72"

I have verified that Typogrify is the last filter applied (weight =10, all other filters 9 or less).
Suggestions?

Comments

Tim Gambell’s picture

Hi TallDavid,

Your bug sounds a lot like this one: http://drupal.org/node/154961

I fixed that one, but I took a shortcut. I'll go back and fix this more thoroughly. Thanks for the heads up.

If you'd like to temporarily modify your code to make it work, find all the places where it says if module_exists('marksmarty') and replace that with if function_exists('smartypants'). There should be like 3 or 4 instances.

Hope that' a help. I'll get on this asap.

Tim Gambell’s picture

Assigned: Unassigned » Tim Gambell
Category: support » bug
Priority: Normal » Critical
Tim Gambell’s picture

Status: Active » Needs review

Added the code described below (required a little extra fiddling around with _TokenizeHTML to make it really work). Give it a spin and let me know if it works for you!

Thanks for submitting this bug. Hopefully it's squashed now.

Tim Gambell’s picture

The fixed code is available in CVS right now; should be available through the project page when the packaging script gets around to it.

TallDavid’s picture

I've installed the latest Typogrify 5.x-1.x-dev (2007-Jul-27) and the problem is resolved. Thanks!

TallDavid’s picture

Status: Needs review » Fixed

I've installed the latest Typogrify 5.x-1.x-dev (2007-Jul-27) and the problem is resolved. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)