I am upgrading an existing website from Symfony 1.3.8 to 1.4.12. I keep getting an error message regarding the javascript helper. Upon doing some research, I found that this was due to a name change of the helper.
I did a manual search/replace in all of my (several hundred) php files from:
<?php use_helper('Javascript'); ?>
to:
<?php use_helper('JavascriptBase'); ?>
I then cleared cache (removed all contents and sub folders manually) and then restarted the website. The site failed to load and when I checked the php_error.log file, I dound the following messages:
Unable to load "JavascriptHelper.php" helper in:
SF_ROOT_DIR/apps/frontend/modules/home/lib/helper,
SF_ROOT_DIR/apps/frontend/lib/helper,
SF_ROOT_DIR/lib/helper,
SF_ROOT_DIR/plugins/sfAssetsLibraryPlugin/lib/helper,
SF_ROOT_DIR/plugins/sfGoogleAnalyticsPlugin/lib/helper,
SF_SYMFONY_LIB_DIR/helper.
I am sure I had replaced all occurrences, so I did a grep search:
grep -lr "use_helper('Javascript'" . 2>/dev/null | grep -v .svn
./doc/2colwideLHS.php
./log/php_errors.log.old
./apps/frontend/modules/sfGuardAuth/templates/registerSuccess.php.old
As can be seen, none of the files used contains the old helper name - why is it still not working, what am I missing?
[[Edit]]
Based on feedback I got, I decided to disable all plugins (with the exception of Propel plugin). This is what my config/ProjectConfiguration.php file looks like:
<?php
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->enablePlugins(array('sfPropelPlugin',
/*'sfAssetsLibraryPlugin',
'sfFormExtraPlugin',
'sfGoogleAnalyticsPlugin',
'sfGuardPlugin'*/));
}
}
However, after clearing cache and refreshing the web page, I get exactly the same error as before. I'm getting desperate now as the site has been taken down for most of the day and I need to get it back online ASAP.
As an aside, I am aware that 1.4.12 is no longer supported, however Symfony moved the goal posts so much from Symfony 1.x to 2.x that an upgrade to 2.0 will involve an entire site rewrite - which I don't have the resources to do at the moment, so I am trying to upgrade the working site to the next best thing, 1.4.12.
1.4 should be fine. I maintain a number of sites using that code base.
Now as yo uour actual problem, I bet its one of the plugins youre using, most likely sfAssetsLibraryPlugin
. You need to upgrade those to their 1.4 branches as well. If they havent been converted from 1.x or have but there were some misses then youll have to fork them and update things yourself.