I deleted my prior version of fusion and git cloned 7.x-2.x alpha into /sites/all/themes. Everything was ok.
I git cloned accelerator. I went to try it out; still got the skinr interface, so I went and disabled that under modules. I have not uninstalled skinr!
Enabled all of the accelerator modules.

The site gives 500 errors.

From the error log:

[Tue Oct 18 13:46:06 2011] [error] [client 10.0.0.233] PHP Fatal error: Cannot redeclare fusion_apply_rules() (previously declared in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_rules.inc:12) in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_ui.rules.inc on line 52, referer: http://esmerel.logrus.com/drupal-7.0/admin/modules
[Tue Oct 18 13:46:20 2011] [error] [client 10.0.0.233] PHP Fatal error: Cannot redeclare fusion_apply_rules() (previously declared in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_rules.inc:12) in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_ui.rules.inc on line 52
[Tue Oct 18 13:46:33 2011] [error] [client 10.0.0.233] PHP Fatal error: Cannot redeclare fusion_apply_rules() (previously declared in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_rules.inc:12) in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_ui.rules.inc on line 52, referer: http://esmerel.logrus.com/drupal-7.0/admin/modules
[Tue Oct 18 13:46:33 2011] [error] [client 10.0.0.233] File does not exist: /var/www/esmerel/favicon.ico
[Tue Oct 18 13:46:57 2011] [error] [client 10.0.0.233] PHP Fatal error: Cannot redeclare fusion_apply_rules() (previously declared in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_rules.inc:12) in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_ui.rules.inc on line 52

If I try to use drush to disable the module:
PHP Fatal error: Cannot redeclare fusion_apply_rules() (previously declared in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_rules.inc:12) in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_ui.rules.inc on line 52
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Cannot redeclare fusion_apply_rules() (previously declared in
/var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_rules.inc:12)
in
/var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_ui.rules.inc,
line 52

CommentFileSizeAuthor
#6 1313768-dup-functions.patch13.88 KBaquariumtap

Comments

esmerel’s picture

Status: Active » Postponed (maintainer needs more info)

HM.

So, I downloaded skinr again, and then made sure I *uninstalled* it, and then deleted.

It.. may be working.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Active

OK, even after removing skinr properly, I'm still seeing 500 errors.

[Wed Oct 26 11:44:07 2011] [error] [client 10.0.0.229] PHP Fatal error: Cannot redeclare fusion_apply_rules() (previously declared in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_rules.inc:12) in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_ui.rules.inc on line 52, referer: http://esmerel.logrus.com/drupal-7.0/admin/modules
[Wed Oct 26 11:44:13 2011] [error] [client 10.0.0.229] PHP Fatal error: Cannot redeclare fusion_apply_rules() (previously declared in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_rules.inc:12) in /var/www/esmerel/drupal-7.0/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_ui.rules.inc on line 52, referer: http://esmerel.logrus.com/drupal-7.0/admin/appearance/fusion

Pages that still 500 error:
appearance/fusion/skins
appearance/fusion/custom_grid
appearance/fusion/rules
appearance/fusion/list/import

and, a lot more :/

This time it seemed to work until I tried to actually *do* something.

esmerel’s picture

ARG; somehow, skinr wasn't removed even though I uninstalled it. There's still the other issue where the user didn't have skinr installed though.,

mauledbylion’s picture

I've got the same problem:

Fatal error: Cannot redeclare function fusion_apply_rules() (previously declared in C:\Program Files\Zend\Apache2\htdocs\THARULL\sites\all\modules\fusion_accelerator\fusion_apply\fusion_apply_rules.inc:12). If this code worked without the Zend Optimizer+, please set zend_optimizerplus.dups_fix=1 in your ini file in C:\Program Files\Zend\Apache2\htdocs\THARULL\includes\module.inc on line 302

I'm building my site locally using ZendServer CE, so as a test I switched off Zend Optimizer+ in the control panel and the error changed to this:

Fatal error: Cannot redeclare fusion_apply_rules() (previously declared in C:\Program Files\Zend\Apache2\htdocs\THARULL\sites\all\modules\fusion_accelerator\fusion_apply\fusion_apply_rules.inc:12) in C:\Program Files\Zend\Apache2\htdocs\THARULL\sites\all\modules\fusion_accelerator\fusion_apply\fusion_apply_ui.rules.inc on line 52

Suggesting that as I got an error with or without Zend Optimizer+, that Zend Optimizer+ wasn't the cause.

I also tried disabling the Fusion Accelerator module directly in MySQL (because I couldn't get into Drupal admin), but that had no effect.

I then tried just deleting the whole Fusion Accelerator module folder, but that then produced a timeout error, so I unzipped the module back into the modules folder to reproduce the errors again.

I originally had Skinr enabled, so to rule out any potential weirdness from that I reinstalled drupal and MySQL, and then only installed the bare minimum of modules, i.e.:

ctools
entity
rules
fusion_accelerator
views

along with the acquia_prosper and fusion themes,

but still got the error.

Just let me know if you need any more info....
Thanks.

esmerel’s picture

More troubleshooting:

I removed (rm -rf fusion_accelerator) accelerator, and the site stops having 500 errors. I drush dl fusion_accelerator again, and the site continues to work. If I go to the modules page, the modules are there and enabled.

However, if I try the looking for the contextual links (edit skin/apply skin/whatever it is) for any of the blocks, they aren't there. I just get the regular 'edit block' type stuff you expect. All of the fusion_apply modules are enabled, and I resubmitted the modules page just to make sure.

THEN, if I drush cc all, it IMMEDIATELY starts blowing 500 errors.

rm -rf fusion_accelerator and drush dl it again and the pages come back.

aquariumtap’s picture

Status: Active » Needs review
StatusFileSize
new13.88 KB

I had been moving all of the functions in Fusion Apply Rules that pertained to the UI into a separate fusion_apply_ui.rules.inc file, but never completed the task. The inc file was in the fusion_apply directory, but was not being included anywhere in Accelerator, which is why I had never happened upon the error. PHP probably only chokes when some Drupal process happens to peak inside that file for whatever reason.

This patch keeps the new fusion_apply_ui.rules.inc file, removes the duplicate functions in fusion_apply_rules.inc, and includes the new file in hook_menu() in the Fusion Apply UI module.

This is definitely critical, so I'd like to get this into a new release asap. Testers appreciated! :)

local-search’s picture

Getting similar error:

Fatal error: Cannot redeclare fusion_apply_rules() (previously declared in /home/content/08/8325708/html/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_rules.inc:12) in /home/content/08/8325708/html/sites/all/modules/fusion_accelerator/fusion_apply/fusion_apply_ui.rules.inc on line 52

cannot run git as i am on a shared server. how else might i patch the version i'm currently using. thank you

aquariumtap’s picture

@local-search, do you have a local installation of the site you are administering? That's the best place to apply a patch, not a public server. There's some docs on setting up a local environment, and an installation guide for git. I know all of that isn't worth it for just this one patch, but the whole d.o system is moving toward this system, so it's worth the time investment if you can spare it. If not, this patch is going to be streamlined into a release ASAP.

esmerel’s picture

log in via shell, go to the /fusion_accelerator directory.

$ wget http://drupal.org/files/1313768-dup-functions.patch

$patch -p1 < 1313768-dup-functions.patch

esmerel’s picture

Status: Needs review » Reviewed & tested by the community

patch is working for me!

sheena_d’s picture

+1 patch #6 works for me, too.

stud_io3’s picture

So how do i apply the patch do I just go to the fusion_apply_rules.inc file and then copy and paste?

aquariumtap’s picture

No, you need to use git apply. This article explains how to use git apply.

aquariumtap’s picture

Status: Reviewed & tested by the community » Closed (fixed)