WordPress.org

Forums

CM Tooltip Glossary
[resolved] Unknown Modifier? (4 posts)

  1. Postmatic
    Member
    Posted 2 years ago #

    Howdy,

    We have been using this plugin just fine, however with our recent upgrade to 1.4 our site is throwing this error:
    Warning: preg_replace() [function.preg-replace]: Unknown modifier 'P' in /nas/wp/www/staging/keshet/wp-content/plugins/enhanced-tooltipglossary/glossary.php on line 343

    Warning: preg_replace() [function.preg-replace]: Unknown modifier 'P' in /nas/wp/www/staging/keshet/wp-content/plugins/enhanced-tooltipglossary/glossary.php on line 398

    Is anyone else having this problem? I can't figure out if it is a conflict with another plugin, or something else. Any starting place would be great.

    Thanks,
    Jason

    http://wordpress.org/extend/plugins/enhanced-tooltipglossary/

  2. Dylan Kuhn
    Member
    Posted 2 years ago #

    This occurs because the slash used to delimit the regular expressions isn't being escaped, so any glossary term with a slash in it barfs hard. In your case the slash comes in front the the letter 'P'.

    Two changes are needed to fix.

    glossary.php:336 should be

    $glossary_title = preg_quote($glossary_title, '/');

    and glossary.php:349 should be

    $link_search = '/<a' . $timestamp . '>(' . preg_quote($glossary_item->post_title, '/') . '[A-Za-z]*?)<\/a' . $timestamp . '>/i';

  3. Postmatic
    Member
    Posted 2 years ago #

    Thanks, Dylan. This works. I hope it gets rolled into future updates...

  4. CM Plugins
    Member
    Plugin Author

    Posted 2 years ago #

    In version 1.5 we added slash to be escaped. Tnx

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • CM Tooltip Glossary
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.