I keep receiving this warning:

warning: preg_replace() [function.preg-replace]: Unknown modifier 'p' in /home..... /modules/pathauto/pathauto.module on line 263.

when using path auto. I have looked at line 263 ( see code below) - and dont' understand what is wrong or how to fix it. I was using alias index but am not any more.

// Get rid of words that are on the ignore list
$ignore_re = "\b". preg_replace("/,/", "\b|\b", variable_get('pathauto_ignore_words', $ignore_words)) ."\b";
263 > $output = preg_replace("/$ignore_re/ie", "", $output);

Can anyone enlighten em as to the problem? I hope to take the site live in a few days.

Comments

Artem’s picture

Similar things happen to me with Pathauto 5.x-2.0-beta2:

# warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /home/content/A/r/t/ArtemMarchenko/html/symbianexample/modules/pathauto/pathauto.inc on line 72.
# warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /home/content/A/r/t/ArtemMarchenko/html/symbianexample/modules/pathauto/pathauto.inc on line 72.
# warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /home/content/A/r/t/ArtemMarchenko/html/symbianexample/modules/pathauto/pathauto.inc on line 72.
...
many similar warning lines

greggles’s picture

Status: Active » Closed (duplicate)
sinewaver’s picture

Version: 5.x-1.2 » 5.x-2.x-dev

I did as you suggested - and updated to the latest dev. version, but still have preg issues. They have now moved to:
warning: preg_replace() [function.preg-replace]: Unknown modifier 'p' in .... /modules/pathauto/pathauto.inc on line 108

(Previously in 5.1.2, warnings were first line 263 - then lines 44, and 72, in pathauto module)

Does this help pinpoint the issue?

alpinejag’s picture

I've been getting errors similar to this with the previous and most recent releases.

preg_replace() [function.preg-replace]: Compilation failed: nothing to repeat at offset 219 in .../modules/pathauto/pathauto.inc on line 108.

Right now I'm using 5.x-2.0-beta3. Php 5.2 with Zend Optimizer.

charmer’s picture

Category: support » bug

similar problem here:

I have Drupal 5.3, latest development version of PathAuto and PHP 5.2 with Zend.

When trying to submit a node I get the following message about 100 times at a time:

warning: preg_replace() [function.preg-replace]: Unknown modifier 'p' in /usr/share/drupal5/modules/pathauto/pathauto.inc on line 123.

The real problem is the alias isn't created. I have [title-raw] template with transliteration turned on for nodes but I get 'Page not found' when attempting to access aliased node URL.

I have another drupal instance with Pathauto in version

v 1.1.2.2 2007/01/17 17:02:42 greggles Exp $

that seems to be working fine.

greggles’s picture

Category: bug » support
Priority: Critical » Normal

@charmer - are you using a WYSIWYG editor? Does it try to apply formatting to the "strings to remove" box?

charmer’s picture

Yes, you are right, in both cases I use FCKEditor, but in the newer Drupal instance I had it configured the way that editor would apply to every textarea field, thus FCKEditor added <p> around the list of strings to remove.

I fixed it by setting "Minimum rows" in "Visibility setting" of FCKEditor to 5 so that the list would remain in plain text all the time.

Thanks a lot for the hint.

simohell’s picture

More flexible still is to go to "admin/settings/fckeditor/edit/Advanced"

and add as option to "Exclude fields, will disable the editor on all selected fields" the field ID:

edit-pathauto-ignore-words

(or the appropriate field ID should there be changes in the respective modules)

ps. One needs to remember also to remove the <p> </p> already added by FCKeditor

xamox’s picture

Ahh, this worked for me, at first was confused, to clarify you need to remove the <p> from the "Strings to remove" in the pathauto module configuration page in the general settings section. Thanks for the help.

Chad_Dupuis’s picture

Thanks for the last note - going into the pathauto settings, clicking on view source, and removing the

and

around the strings to exclude worked perfectly.

It would be great if this note got added into the readme/install info...

greggles’s picture

Title: Preg replace » Document Wysiwyg Conflict
Component: Code » Documentation
Category: support » task
Status: Closed (duplicate) » Active

Good idea.

greggles’s picture

Status: Active » Fixed

I added

**WYSIWYG Conflicts - FCKEditor, TinyMCE, etc.
If you use a WYSIWYG editor, please disable it for the Pathauto admin page.
Failure to do so may cause errors about "preg_replace" problems due to the

tag being added to the "strings to replace". See http://drupal.org/node/175772

To the README.txt and the project homepage. Let me know if you have any ideas on how to make it better.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

foo’s picture

I'm on FCK 5.x-2.1-beta2, Pathauto 5.x-2.1, and Drupal 5.6, I've excluded 'edit-pathauto-ignore-words' and 'admin/settings/pathauto', but I still get this:

warning: preg_match() [function.preg-match]: Unknown modifier 't' in /home/username/public_html/sites/all/modules/fckeditor/fckeditor.module on line 1702.

I've checked all text fields on /admin/settings/pathauto, and nothing seems to have html or WYSIWYG badness.

Any ideas?

-Foo

DrumLib’s picture

Version: 5.x-2.x-dev » 6.x-1.2

More flexible still is to go to "admin/settings/fckeditor/edit/Advanced"

and add as option to "Exclude fields, will disable the editor on all selected fields" the field ID:

edit-pathauto-ignore-words

(or the appropriate field ID should there be changes in the respective modules)

ps. One needs to remember also to remove the <p> </p> already added by FCKeditor

How do you remove the <p> </p> already added by FCKeditor?

Zvone’s picture

After edit any node with Wysiwyg I find over 50 error messages in log:
mb_eregi_replace() [function.mb-eregi-replace]: mbregex compile err: unmatched close parenthesis in ...sites\all\modules\pathauto\pathauto.inc in line 136.
I tried to use some hints here but with no success.
Any help?

Zvone’s picture

Sorry for spamming, I found a mistake; I added :) in exclude list. After removing, the error is not shown anmore.