Drupal 6.13
jQuery 6.x-1.1

Enabled the module, added your example text popup code to the body of a node

[popup text='Yay this is the popup text!' effect=fade title='TEST POPUP TEXT' link='/']<br /><br />

(the popup filter was selected)

Upon saving the node I get the error:

warning: preg_replace() [function.preg-replace]: Unknown modifier ''' in E:\home\blah\public_html\sites\all\modules\popup_filter\popup_filter.module on line 460.

When I view the node I see the link plus the popup text. Needless to say it does not work as expected.

Any ideas please as I think this module is exactly the thing I need, if only it would work...

Thanks

Comments

pinkradical’s picture

Status: Active » Closed (fixed)

Further investigation: seemed the theme functions were not being called properly. I think something was bad with my Drupal system as a complete uninstall of the module and re-enable fixed the issue.

Doesn't seem to work with Opera though.

andrewsuth’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

I had the same error but uninstalling and reinstalling the module did not remove it. As it is, this module does not work after following the simple installation instructions:

  • Install the popup_filter module
  • Insert [popup] tags in content, and set the input format to "Popup filter" (I used the same popup insert as pinkradical in the previous comment)

I have ruled out the Theme as I have used both Garland and a sub-theme of Zen.

The suspect line of code is this one:
$inner = preg_replace('/\Q'.$result[0].'\E/', '', $inner, 1);

I also installed jQuery 6.x-1.1 for this module but there is no documentation saying if this is necessary in the 6.x branch. If it is a dependency of the Popups Filter module it should be added to the popup_filter.info file with dependencies[] = jquery_update

Scheepers de Bruin’s picture

I've added the dependency in the latest release (6.x-2.3)

Scheepers de Bruin’s picture

Assigned: Unassigned » Scheepers de Bruin
Status: Active » Closed (fixed)
andrewsuth’s picture

Title: Doesn't seem to work at all » warning: preg_replace() [function.preg-replace]: Unknown modifier '''
Version: 6.x-2.2 » 6.x-2.3
Component: Code » Documentation
Assigned: Scheepers de Bruin » Unassigned
Priority: Critical » Minor
Status: Closed (fixed) » Active

I installed Popup filter 6.x-2.3 and jQuery 6.x-1.1 but I was experiencing the same problem as originally described by pinkradical.

I was getting the error:
warning: preg_replace() [function.preg-replace]: Unknown modifier ''' in /.../modules/popup_filter/popup_filter.module on line 464.

When I added this basic popup to a block:
[popup text='Yay this is the popup text!' effect=fade title='TEST POPUP TEXT' link='/']<br /><br />

The problem I discovered was with link='/' in the popup input. It seems that the example does not work well because it was not escaping the / (special character).

If others also get this problem with this example, I think this should be changed/updated in the documentation.

UPDATE: I forgot to mention that I think this module is really amazing and adds a much more effective UI experience for my users. Keep up the excellent work.

Scheepers de Bruin’s picture

Component: Documentation » Code
Assigned: Unassigned » Scheepers de Bruin
Status: Active » Patch (to be ported)
StatusFileSize
new1.32 KB

Thanks man, good to know it's making a difference.

Here's a patch to fix the attribute parsing of the '/' character

Scheepers de Bruin’s picture

StatusFileSize
new1.41 KB

And here's the patch for 5.23

Scheepers de Bruin’s picture

Status: Patch (to be ported) » Closed (fixed)

Fixed in v3