Upgrade OJS3.0 Fatal error: Cannot redeclare class Plugin

Hi, I am upgrade OJS from 2.4.8.1 to OJS 3.0. I follow this instruction https://github.com/pkp/ojs/blob/master/docs/UPGRADE. My PHP version is 5.6.24. I get this error.

  # php upgrade.php upgrade
    PHP Notice:  Use of undefined constant BLOCK_CONTEXT_RIGHT_SIDEBAR - assumed 'BLOCK_CONTEXT_RIGHT_SIDEBAR' in D:\xamppphp56\htdocs\ejournal\plugins\blocks\donation\DonationBlockPlugin.inc.php on line 42

Notice: Use of undefined constant BLOCK_CONTEXT_RIGHT_SIDEBAR - assumed 'BLOCK_CONTEXT_RIGHT_SIDEBAR' in D:\xamppphp56\htdocs\ejournal\plugins\blocks\donation\DonationBlockPlugin.inc.php on line 42
PHP Notice:  Use of undefined constant BLOCK_CONTEXT_RIGHT_SIDEBAR - assumed 'BLOCK_CONTEXT_RIGHT_SIDEBAR' in D:\xamppphp56\htdocs\ejournal\plugins\blocks\help\HelpBlockPlugin.inc.php on line 50

Notice: Use of undefined constant BLOCK_CONTEXT_RIGHT_SIDEBAR - assumed 'BLOCK_CONTEXT_RIGHT_SIDEBAR' in D:\xamppphp56\htdocs\ejournal\plugins\blocks\help\HelpBlockPlugin.inc.php on line 50
PHP Notice:  Use of undefined constant BLOCK_CONTEXT_RIGHT_SIDEBAR - assumed 'BLOCK_CONTEXT_RIGHT_SIDEBAR' in D:\xamppphp56\htdocs\ejournal\plugins\blocks\fontSize\FontSizeBlockPlugin.inc.php on line 52

Notice: Use of undefined constant BLOCK_CONTEXT_RIGHT_SIDEBAR - assumed 'BLOCK_CONTEXT_RIGHT_SIDEBAR' in D:\xamppphp56\htdocs\ejournal\plugins\blocks\fontSize\FontSizeBlockPlugin.inc.php on line 52
PHP Notice:  Constant PLUGIN_FILTER_DATAFILE already defined in D:\xamppphp56\htdocs\ejournal\lib\pkp\classes\plugins\PKPPlugin.inc.php on line 46

Notice: Constant PLUGIN_FILTER_DATAFILE already defined in D:\xamppphp56\htdocs\ejournal\lib\pkp\classes\plugins\PKPPlugin.inc.php on line 46
PHP Fatal error:  Cannot redeclare class Plugin in D:\xamppphp56\htdocs\ejournal\classes\plugins\Plugin.inc.php on line 19

Fatal error: Cannot redeclare class Plugin in D:\xamppphp56\htdocs\ejournal\classes\plugins\Plugin.inc.php on line 19

Anyone have solutions? thank you

See this thread for a similar situation:

You will want to also perform the same work to look for a duplicated declaration like class ThemePlugin. This might occur if you have mixed OJS2 files with OJS3 files, or if you have multiple copies of the same file with different capitalization.

1 Like