Download & Extend

pathauto generates warning and node path not updated

Project:Pathauto
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Whenever I submit content to my test D6 site, I get this series of error, and yes, I realize it's the same error 4 times.

* warning: mb_ereg_replace() expects parameter 3 to be string, array given in /var/www/pathtositeroot/sites/all/modules/pathauto/pathauto.inc on line 165.
* warning: mb_ereg_replace() expects parameter 3 to be string, array given in /var/www/pathtositeroot/sites/all/modules/pathauto/pathauto.inc on line 165.
* warning: mb_ereg_replace() expects parameter 3 to be string, array given in /var/www/pathtositeroot/sites/all/modules/pathauto/pathauto.inc on line 165.
* warning: mb_ereg_replace() expects parameter 3 to be string, array given in /var/www/pathtositeroot/sites/all/modules/pathauto/pathauto.inc on line 165.

The node is saved successfully but the path is the same as it would be without the pathauto module installed.

This happens with various content types, this one was for a blog entry. If you need additional information and/or testing on a different install, I can do that, just let me know.

Comments

#1

Status:active» postponed (maintainer needs more info)

Are you using freetagging? Does this error still happen if you disable all the taxonomies for the node?

I think this is related to taxonomies and a duplicate of http://drupal.org/node/222637 but I'm not sure.

#2

Status:postponed (maintainer needs more info)» active

This may have its roots somewhere else. I added a term to taxonomy and received these errors:

warning: array_merge_recursive() [function.array-merge-recursive]: recursion detected in /var/www/pathtositeroot/includes/module.inc on line 473.
warning: mb_ereg_replace() expects parameter 3 to be string, array given in /var/www/pathtositeroot/sites/all/modules/pathauto/pathauto.inc on line 165.

#3

Yes, I'm using freetagging. The problem does not exist if I disable freetagging for that content type.

BTW, I had noticed the more terms I had in freetagging, the more times that error occurred.

Sorry about the duplicate issue, I must have missed that somehow when reviewing the issue queue. I will monitor that issue from here on out.

Thanks.

#4

Status:active» closed (duplicate)

Yeah, I'd say it's a duplicate of that issue then.

#5

i give this erro too..

when i go to save a new node, my pathauto not created a new alias, but the node is save correct.

#6

Hi i experienced this bug too and wasn't using advanced blog !
I experienced the bug when uploading multiples files to a node or when viewing / editing a node with a multiple files field
I have done a patch for the current stable version (6x-1.3).

Basically if an array is passed, it just take the first element of it (and it's safe because, if an array is passed it's a not wanted behaviour, and it's something that should not be passed to pathauto, so nothing unwanted will be done).
It will just makes mb_eregi_replace happy in case an array has lost his way through pathauto_cleanstring , and do not produce warning anymore.

AttachmentSizeStatusTest resultOperations
mb_eregi_replace-warning.patch695 bytesIgnored: Check issue status.NoneNone

#7

Status:closed (duplicate)» postponed (maintainer needs more info)

I think this actually is a problem caused when multiple modules define the same token. Can you please try upgrading to token 6.x-1.x-dev and confirm if this is still a problem or if you see any 'token' watchdog messages?

#8

Hi Dave, as you suggested I tried the 6.x-1.x-dev version of token and revert my code of pathauto.inc to the original 6.x-1.3 version, and the warning message is gone.

Thanks for pointing me there :)

David

#9

Status:postponed (maintainer needs more info)» fixed

Thanks for the follow-up. Marking this as fixed.

#10

Status:fixed» closed (fixed)

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

nobody click here