Posted by marcingy on March 29, 2009 at 4:29pm
| Project: | AHAH helper |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
Not sure where this should set but as you are the maintainer for both modules it shouldn't matter.
Basically if this module and hierarchical select are installed on a site the following error is generated
*Fatal error*: Cannot redeclare array_smart_merge() (previously declared in /var/www/web100/sites/all/modules/ahah_helper/ahah_helper.module:268) in */var/www/web100/sites/all/modules/hierarchical_select/includes/common.inc* on line *398
No patch provided as I don't know what naming convention should be followed here.
Comments
#1
I just ran into this as well. I have to turn off HS for now in order to keep going. I get the error when I try to add a new vocabulary:
Fatal error: Cannot redeclare array_smart_merge() (previously declared in C:\apache-htdocs\htdocs_vhost-classic\sites\all\modules\ahah_helper\ahah_helper.module:268) in C:\apache-htdocs\htdocs_vhost-classic\sites\all\modules\hierarchical_select\includes\common.inc on line 415
#2
Subscribe. Both modules seems to have copied the function somewhere else and didn't renamed it properly with their module prefix. To fix it, rename the function to "ahah_helper_array_smart_merge()" and rename the corresponding function calls. I've posted this issue also to the Hierarchical Select issues. Regards Jens
#3
Hi, Had this same problem. would be great if you filed a patch, so it can be committed.
Not at home now, so I can't do it.
greetings,
Martijn
#4
Errr... Yes. A patch, or better still a new release, please! This crashes my whole system if I just upload this module!
#5
patch attached should cover the renaming the function in #2
#6
Hi, Had this same problem. If i remove the function from the helper module. Its works fine. But i guess this is not the best solution
Thanks
Himangshu
#7
Hi removing not necessary. Renaming is enough:)
#8
subscribe
#9
Hi,
Had the same errors with HS, applied the patch but now FB style links does not work when you 'attach', it just shows 'link' in text.
Results is as attached screenshot.
Would love to make this work :)
Looking forward to an update ..
#10
Patch in #5 works here. Btw, I've seen the patch for HS solves it with function_exists()
#11
marking as a duplicate of #689196: duplicate function in project
The patch at the link above solves this with function_exists() as solved in hierarchical select here: #689222: Check if array_smart_merge() function exists before defining it