mb_ereg_replace error when creating taxonomy term (or forum or gallery or...)

sgtaw - February 16, 2008 - 21:21
Project:Pathauto
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

Hello,

I get this error when trying to create a forum in Drupal 6

---------BEGIN------------------

* warning: mb_ereg_replace() expects parameter 3 to be string, array given in /home2domain/public_html/modules/pathauto/pathauto.inc on line 158.
* warning: mb_ereg_replace() expects parameter 3 to be string, array given in /home/domain/public_html/modules/pathauto/pathauto.inc on line 158.

---------------------END----------------

#1

greggles - February 19, 2008 - 14:48
Title:Using Drupal 6 to create a forum gives error» mb_ereg_replace error when creating taxonomy term (or forum or gallery or...)

Marked http://drupal.org/node/223758 a duplicate of this and updated the title.

#2

phosphoric - February 23, 2008 - 16:39
Component:i18n Stuff» Miscellaneous

Same issue, slightly different errors.

warning: array_merge_recursive() [function.array-merge-recursive]: recursion detected in /home/.katch/user/drupal/includes/module.inc on line 473.

warning: mb_ereg_replace() expects parameter 3 to be string, array given in /home/.katch/user/drupal/sites/all/modules/pathauto/pathauto.inc on line 165.

Occurs when adding or editing forums or containers. Second error can repeat many times when editing an existing forum or container.

#3

mrgoltra - February 26, 2008 - 21:48

Good Day,

Getting it to when I submit a page or any other content.

* warning: mb_ereg_replace() expects parameter 3 to be string, array given in /hsphere/local/home/friedelectronics.com/sites/all/modules/admin/pathauto/pathauto.inc on line 165.

* warning: mb_ereg_replace() expects parameter 3 to be string, array given in /hsphere/local/home/friedelectronics.com/sites/all/modules/admin/pathauto/pathauto.inc on line 165.

Thanks

#5

joglin - February 27, 2008 - 09:50

Forum uses taxonomy see bug #219541 and try patch. Maybe some versions of php not suffer of Bug #42177 and the warning array_merge_recursive() not occurs

#6

greggles - February 27, 2008 - 14:28
Component:Miscellaneous» Code
Status:active» duplicate

@joglin - then I guess this is a duplicate of issue #219541: warning: array_merge_recursive() ?

@mrgoltra and @phosphoric and @sgtaw can you test that?

#7

Miraploy - August 17, 2008 - 05:39
Version:6.x-1.x-dev» 6.x-2.x-dev
Status:duplicate» active

I also get this error.

I have the latest dev, I assume the bug #219541 patch is included?

I should add that I get the error whenever creating or editing a node.

Shoot, I might be doing this to the wrong issue.

I just realized that my error is on line 178 rather than 158.

#8

greggles - August 17, 2008 - 05:57
Status:active» active (needs more info)

@Miraploy - please alter your code like this:

  if (function_exists('mb_eregi_replace')) {
    $output = mb_eregi_replace($ignore_re, '', $output);
  }

  if (function_exists('mb_eregi_replace')) {
    drupal_set_message('<pre>'. print_r($output, true) .'</pre>'); // THIS LINE IS NEW
    $output = mb_eregi_replace($ignore_re, '', $output);
  }

Then when do whatever is necessary to get the error and copy/paste the output from the drupal_set_message into a comment on this issue.

#9

Miraploy - August 17, 2008 - 13:41

OK I have this:

*

Typemoon General

*

Typemoon General

*

update

*

Array
(
[0] => 1
[1] => 1
)

*

Array
(
[0] => genSun
[1] => genSun
)

*

a hrefuser1genSuna

*

*

38 years

*

*

*

*

gensun

*

Miraploy

*

3

*

miraploygmailcom

*

httptypemoonus

*

Typemoonus

*

The Unreal Fansite

*

The Typemoon Fansite

*

generalsungmailcom

*

Sun 08172008 - 0929

*

*

*

*

*

*

9

*

forum

*

Forum topic

*

*

Test Thread

*

Test Thread

*

genSun

*

generalsungmailcom

*

generalsungmailcom

*

2008

*

08

*

August

*

Aug

*

08

*

8

*

33

*

7

*

Sunday

*

Sun

*

17

*

17

*

2008

*

08

*

August

*

Aug

*

08

*

8

*

33

*

7

*

Sunday

*

Sun

*

17

*

17

*

*

*

*

*

*

*

All Typemoon Discussion

*

All Typemoon Discussion

*

6

*

Forum

*

Forum

*

1

*

0

*

0

*

*

*

*

*

Test Thread

*

*

Test Thread

*

*

Test Thread

*

*

Typemoon-General//All Typemoon Discussion

*

Typemoon-General//All Typemoon Discussion

*

All Typemoon Discussion

* Forum topic Test Thread has been updated.

* warning: mb_eregi_replace() expects parameter 3 to be string, array given in /home2/mydainet/public_html/sites/all/modules/pathauto/pathauto.inc on line 179.
* warning: mb_eregi_replace() expects parameter 3 to be string, array given in /home2/mydainet/public_html/sites/all/modules/pathauto/pathauto.inc on line 179.

#10

greggles - August 17, 2008 - 15:20

This was my guess:

Array
(
[0] => genSun
[1] => genSun
)

That's a sign that there is something else wrong with your installations of some other module. Can you please start disabling modules on the site until you are left with just Pathauto and Token. If you disable a module, do this test, and repeat that process we will be able to determine which one it is.

#11

greggles - September 2, 2008 - 18:28
Status:active (needs more info)» duplicate

2 weeks with no response -> back to duplicate.

 
 

Drupal is a registered trademark of Dries Buytaert.