Whenever I want to create a container or a forum it warns me :
warning: array_merge_recursive() [function.array-merge-recursive]: recursion detected in /home/mydomain/includes/module.inc on line 473.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | pathauto.219541.patch | 1.24 KB | joglin |
| #7 | details.txt | 1.21 KB | joglin |
| #2 | 3rdptymodules.png | 4.56 KB | pictogram |
Comments
Comment #1
neclimdulCould not reproduce. could you give us some more information. maybe module list?
Comment #2
pictogram commentedSure,
All core optionals except :
- blog api
- content translation
- php filter
- throttle
3rd pty :
see attached png
THanks
Comment #3
pictogram commentedAfter disabling all modules, I found that pathauto seems to conflict ?? I'm using the 6.x-1.x-dev.
Should I issue the conflict in pathauto or is it a drupal 6 problem ???
pictogram
Comment #4
neclimdulI still couldn't reproduce this with pathauto installed. But, I ran with the latest checkout from CVS so its possible its been fixed recently.
By conflict, do you mean the problem only occurs when pathauto is installed?
Comment #5
fokkezb commentedI get this error every time I want to add a taxonomy term. I also have pathauto installed.
Comment #6
fokkezb commentedI also get it when I bulk generate paths... so it's not a Drupal Taxonomy but Pathauto bug. For this, I changed project of this issue.
Comment #7
joglin commentedI have the same problem. There is a bug in php and in Pathauto
Php bug details: http://bugs.php.net/bug.php?id=42177
See attachment for details about pathauto
Comment #8
pictogram commenteddefinitely yes !!
pictogram
Comment #9
greggles@joglin - interesting research. Do you have any ideas on how to fix this? I haven't looked into it yet myself.
Comment #10
joglin commentedtaxonomy_token_values() provide itself to fill keys 'cat' and 'cat-raw'. What do these lines mean?
pathauto.module lines 433 - 437
Comment #11
mrgoltra commentedsubscribing.
Not just in the Forums for me. I get this when creating any new term in any taxonomy. Fresh install of RC4
Comment #12
JMowery commentedI am also getting this error. Only happens when Pathauto is enabled. Running Drupal 6 final.
Comment #13
account-deletion-needed commentedI can confirm this on my side, too. Happens every time I add/change a taxonomy term. Using Drupal 6.0 final.
Comment #14
hgreer commentedAlso having this problem on a new install of Drupal 6. It happens when Bulk Generating aliases.
Any word on the what the fix is yet?
Comment #15
gregglesIf I had a fix for this I assure you I wouldn't be hiding it ;)
I'm working to stabilize and release a 5.x-2.1. Once I'm done with that I will begin to look into some of these 6.x specific bugs. If someone else can investigate/fix this I would appreciate it.
Comment #16
adityaw commentedI have the same problem with pathauto and drupal 6 final when adding taxonomy terms.
Comment #17
JMowery commentedI can also confirm this happening with bulk updates.
However, I have more errors now. Here is the output after a bulk update:
* The configuration options have been saved.
* Bulk generation of terms completed, one alias generated.
* warning: array_merge_recursive() [function.array-merge-recursive]: recursion detected in /var/www/html/includes/module.inc on line 473.
* warning: mb_ereg_replace() expects parameter 3 to be string, array given in /var/www/html/sites/all/modules/pathauto/pathauto.inc on line 165.
Comment #18
CosmicVoyager commentedsubscribed
Comment #19
joglin commentedI solved it
Comment #20
greggles@joglin - can you explain your patch like why you removed the code you removed? I haven't looked into this yet so I'm not sure I understand that.
Comment #21
joglin commentedtaxonomy_token_values() and pathauto_token_values(), provide to the tokens 'cat' and 'cat-raw'.
In drupal5 module_invoke_all use array_merge() to merge all the values retured from the modules to implement an hook
in this case last value overwrite the previous with the same key.
In drupl6 instead, module_invoke_all() use array_merge_recursive(). The same keys merged generates a subarray. In this case, a bug PHP throw the false warning and stop merging. But the result of call module_invoke_all ("token_values ", ...) by token contains subarray in 'cat' and (if the bug in the PHP does not exist) in 'cat-raw'. After pathauto_clean_token_values() normalize this subarray in an empty string.
sorry for my english
Comment #22
gregglesThanks very much for the explanation joglin. The patch (code needs review) status is the best for this issue since there is a patch attached and, if it gets reviewed by a few people as working then it can be committed.
Thanks again.
Comment #23
milianw commentedI can confirm that this solves this issue. Also it makes it possible for me to once again add terms via free tagging while editing / creating content. Thanks joglin.
I've done some debugging, and here are the results, I can't really see whats the problem, but well, the patch solves it nonetheless:
I've added above and below the lines which were changed by the patch a
dprint_r($values)call and here are the results:unpatched
patched code
So the function gets called twice after applying the patch. The tag gets generated as well to my liking. So once again - thank you joglin!
Comment #24
JMowery commentedSweet, it appears it is working then. Hopefully a few others can confirm so it can be committed.
Comment #25
hansamurai commentedI am getting the same errors when trying to apply bulk generation of taxonomy aliases.
I'm not sure how to patch though so I'll probably wait until it has been committed.
Comment #26
JMowery commentedhansamurai, I received this error as well. I am not sure if the patch fixes this, but I am hopeful.
Comment #27
poehnix commentedPatch works for me too (adding a taxonomy term)
Comment #28
joglin commentedPatch solves all warning array_merge_recursive() relating to taxonomy and empty tokens [cat] and [cat-raw]
Comment #29
gregglesThanks everyone for the patch and testing and especially to joglin and milianw.
I've applied this to HEAD. It seems to fix a few other issues, so that's nice.
Comment #30
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #31
Babalu commented(Stripping trailing CRs from patch.)
patching file pathauto.module
Hunk #1 FAILED at 430.
patch not working for me
error is:
warning: mb_eregi_replace() expects parameter 3 to be string, array given in /var/www/web3/html/sites/all/modules/pathauto/pathauto.inc on line 228.
Comment #32
greggles@Babalu - there are many possible reasons for that error message, this page is only one of them.
See http://www.google.com/search?hl=en&q=+site:drupal.org+mb_eregi_replace()+expects+parameter+3+to+be+string,+array+given+in+pathauto.inc+on+line
Generally speaking these days the reason for that error is an improper hook_token_values implementation in some other module.
Comment #33
brianbrown commentedI have this issue also with the exact same error as illustrated in the description.Please reopen.
Thanks!
Brian Brown, Ph.D.
Comment #34
brianbrown commentedIt turns out that my issue (which was IDENTICAL to this issue) was being caused by the twitter module!
-Brian