
Originally Posted by
NWCE
Thanks again for your reply carlwhat!
I have tried marcopm's plugin from Github as you had suggested...but this code which is intended to recognize and deal with old versions does not allow you to install the plugin.
When all files are uploaded and I go to Admin->Modules->Plugin Mgr, I see the plugin and press the Install key, only to get a white screen and the plugin gets tripped up at DoInstall.
The Debug Error is specifically referencing this code about dealing with past versions.
PHP Fatal error: Declaration of ScriptedInstaller::doUpgrade(string $oldVersion = ''): bool must be compatible with Zencart\PluginSupport\ScriptedInstaller::doUpgrade($oldVersion): ?bool in /home/mysite/public_html/new210/zc_plugins/InstantSearch/v4.0.3/Installer/ScriptedInstaller.php on line 27
this is a very different error than what you were getting before. one has nothing to do with the other.
it looks like you need to make the following changes:
on lines 27, 65 and 124, you will need to change as fllows:
PHP Code:
public function doUpgrade(string $oldVersion = ''): ?bool
public function doInstall(string $oldVersion = ''): ?bool
public function doUninstall(string $oldVersion = ''): ?bool
all you are doing is adding a question mark to before the term bool. that's all you are doing.

Originally Posted by
NWCE
When deleting this entire code from line 27 down, and then Installing from Admin-> Plugin Mgr the plugin installs and runs perfectly when tested....no Debug Errors.
where did you ever get that idea to delete all of that code??
of course if you delete all of the code the installer will run perfectly. tell me to do nothing... i'm real good at that.

Originally Posted by
NWCE
Duplicate key name 'idx_products_name'
Duplicate key name 'idx_products_description'
When I Search my database....these do not come up in any table....so not sure why this error is occurring.
I understand that he is likely busy!
why someone responds or does not respond, i try not to get too involved in it. i'm also quite busy...
that said, these are keys. they are not in a database table. they are a part of the database table. they are indexes onto the database table.
if the changes i made above do not work, you can try running the following mysql commands.
Code:
drop index idx_products_name on products_description;
drop index idx_products_description on products_description;
these can be done on the mysql command line, using a tool like phpmyadmin or my least favorite, install sql patches on the backend of your zc admin page under tools menu. the above mysql statements will need to use a prefix for the products_description table name. if you do not know what i am talking about... well perhaps someone else can help you out.
after you drop the indexes, you can then run the installer again. but it definitely looks like you will need those 3 question marks i referenced above.
let us know how it goes.