Development

#965 (Only in Dev: Cannot redeclare get_callbacks() .... JavascriptHelper.php)

You must first sign up to be able to contribute.

Ticket #965 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

Only in Dev: Cannot redeclare get_callbacks() .... JavascriptHelper.php

Reported by: snowkrash Assigned to:
Priority: major Milestone: 1.0.0
Component: generator Version: 1.0.7
Keywords: Cc:
Qualification:

Description

Hi,

I get this message:

Fatal error: Cannot redeclare get_callbacks() (previously declared in C:\Program Files\xampp\php\pear\symfony\helper\JavascriptHelper.php:50) in C:\Program Files\xampp\php\pear\symfony\helper\JavascriptHelper.php on line 61

when using a

<?php echo use_helper('Object') ?>

in a template.

It all worked fine when the project ran under SF 0.7.xxx. Now it runs under the lastest release 0.9.2233 (reinstall latest XAMPP with latest SF).

This only happens in development mode. The live version works like a charm.

ForumMessage did not solve it.

The complete message:

Fatal error: Cannot redeclare get_callbacks() (previously declared in C:\Program Files\xampp\php\pear\symfony\helper\JavascriptHelper.php:50) in C:\Program Files\xampp\php\pear\symfony\helper\JavascriptHelper.php on line 61
Call Stack
#	Function	Location
1	{main}()	E:\Websites\projects\WKPoule\web\WKPoule_dev.php:0
2	sfFrontWebController->dispatch()	E:\Websites\projects\WKPoule\web\WKPoule_dev.php:10
3	sfController->forward()	C:\Program Files\xampp\php\pear\symfony\controller\sfFrontWebController.class.php:48
4	sfFilterChain->execute()	C:\Program Files\xampp\php\pear\symfony\controller\sfController.class.php:344
5	sfRenderingFilter->execute()	C:\Program Files\xampp\php\pear\symfony\filter\sfFilterChain.class.php:45
6	sfFilterChain->execute()	C:\Program Files\xampp\php\pear\symfony\filter\sfRenderingFilter.class.php:35
7	sfWebDebugFilter->execute()	C:\Program Files\xampp\php\pear\symfony\filter\sfFilterChain.class.php:45
8	sfWebDebug->getResults()	C:\Program Files\xampp\php\pear\symfony\filter\sfWebDebugFilter.class.php:62
9	sfWebDebug->loadHelpers()	C:\Program Files\xampp\php\pear\symfony\debug\sfWebDebug.class.php:156
10	sfLoader::loadHelpers()	C:\Program Files\xampp\php\pear\symfony\debug\sfWebDebug.class.php:111

Does anyone know what's up? It looks like something buggy, because everything works OK in production, but not in development ... I think.

Change History

09/30/06 10:47:24 changed by fabien

  • milestone set to 1.0.0.

09/30/06 10:48:03 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [2241]) fixed javascript helper loading twice (closes #965)

12/14/06 00:22:23 changed by qube

  • status changed from closed to reopened.
  • resolution deleted.

I use Symfony 1.0 beta1 and have exactly same problem.

12/16/06 17:26:47 changed by fabien

  • status changed from reopened to closed.
  • resolution set to fixed.

Perhaps you use a require_once or include_once to include helpers. You cannot use this. If you always use sfLoader::loadHelpers() method, it will fix your problem.

09/26/07 17:19:11 changed by pasha

  • version changed from 0.7.X to 1.0.7.
  • component set to generator.
  • qualification set to Unreviewed.

Hi there!

I had the same fatal error: Fatal error: Cannot redeclare get_callbacks()

After several experiments I found that if edit in the file \data\generator\sfPropelAdmin\default\template\templates\editSuccess.php

at the begining of code in this string [?php use_helper('Object', 'Validation', 'ObjectAdmin?', 'I18N', 'Date') ?]

we need to remove 'ObjectAdmin?' that it string become like: [?php use_helper('Object', 'Validation', 'I18N', 'Date') ?]

I don't why but it works. Create/Edit/Delete are working properly.

Good Luck!