Index Copernicus 500 Error

Hi,

i was using latest version of OJS

i had installed Index Copernicus plugin from gallery and as well as from https://github.com/a-vodka/ojs_copernicus_export_plugin/

once i followed steps to export it shows “HTTP ERROR 500”

@a-vodka Something for you I guess…

Hello @salman20054

Could you please share the error log of your web server?

Hello @a-vodka,

Please find the error associated with it.

[12-Oct-2019 10:45:17 UTC] PHP Notice: Only variables should be assigned by reference in OJS/plugins/importexport/copernicus/CopernicusExportPlugin.inc.php on line 242
[12-Oct-2019 10:45:17 UTC] PHP Notice: Undefined property: Smarty_Internal_Undefined::$objMap in OJS//lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_handler.php on line 132
[12-Oct-2019 10:45:17 UTC] PHP Fatal error: Uncaught --> Smarty: undefined extension class ‘Smarty_Internal_Method_Assign_By_Ref’ <–
thrown in OJS/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_undefined.php on line 62

@salman20054, to help you I need an addition information. What version of OJS do you use? Also I need information about version of smarty library for php. Could you provide phpinfo() for your server. Thank you.

May be this link will be useful for you
https://www.smarty.net/forums/viewtopic.php?p=91355
https://www.smarty.net/forums/viewtopic.php?p=88123

OJS version: 3.1.2.1
PHP version: 7.3.8

@a-vodka I would get accurate information regarding to that can you help to resolve this things.

Dear @salman20054,
There are a lot of difficulties to identify the problem. It looks like you have specific combination of OJS and PHP versions. To find answer I need to know the version of smarty. It could be obtained from phpinfo() or from control panel of the hosting server.

May be @asmecher could help us.

Hi all,

OJS 3.1.1 and prior use Smarty v2 and OJS 3.1.2 uses Smarty v3. There are some convention changes between the two, e.g. the assign_by_ref function becomes assignByRef. These changes would need to be made in the plugin code before the plugin will be compatible with OJS 3.1.2 (and newer).

Regards,
Alec Smecher
Public Knowledge Project Team

Dear @asmecher,
Latest version of plugin supports OJS 3.1.2 and Smarty3.

Please visit http://rubatosis.org/phpinfo.php
for Php Versions of site

Hi @a-vodka,

Looking at the master branch for CopernicusExportPlugin.inc.php, I still see a reference to assign_by_ref.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

You should look on this branch.

Master branch for ojs2 support.

Hi @salman20054,

Do you see “assign_by_ref” anywhere inside CopernicusExportPlugin.inc.php?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

i had seen /plugins/importexport/copernicus/CopernicusExportPlugin.inc.php, Line 245 “$templateMgr->assign_by_ref(‘issues’, $issues)”

Hi @salman20054,

That means the version of the plugin you have installed isn’t compatible with your version of OJS.

Regards,
Alec Smecher
Public Knowledge Project Team

HI @asmecher,

i had installed the plugin which is mentioned in “plugin gallery” the github link which was mentioned by @a-vodka is different. i had gone through the difference between two file of CopernicusExportPlugin.inc.php i had seen some additions of “assign_by-ref”.

Please, manually install this version of plugin https://github.com/a-vodka/ojs_copernicus_export_plugin/releases/download/0.0.4/copernicus-ojs3-0.0.4.tar.gz

This doesn’t work. If I install from your link, I get the message that I need to update it. If I update from plugin gallery I receive the message “Plugin already installed, and is newer than the version available in the gallery.”.