angela-d/abandoned-carts-opencart

Server 500 Issue

radact2 opened this issue · 6 comments

I after "uninstalling" the mod with Extension Uninstaller, I was unable to login to my admin panel and got a Server 500 error.

I resolved the admin login issue by uploading the php files manually via ftp, which seemed to at least restore the missing files. The problem returns if I uninstall again and I have to ftp again.
Once I can log in, I then upload using the Extension Installer, choose it from the Extensions/Modules section and enable it.

It still shows as version 1.2.4 though, not 1.2.6,

The alert now does display though, but slightly corrupted probably due to the many install/uninstall attempts, see screenshot attached. If we can fix that, it be great.

alert

alert2
Nevermind... I fixed it.
I forgot I modified the /admin/view/template/commonheader.tpl file with // comments to make your code stand out while I was debugging. I removed those and it displays properly now... only shows 1 Bailed Carts entry now.

Still unsure about the version number and the error uninstalling if it will be an ongoing issue, but i don't plan on removing it again anytime soon.

The 500 error could be caused by removing parts of the extension, while leaving others.

The safest way to remove an extension is to unzip the original package you used to install and delete the files that are shown, by hand.

The install.xml file makes changes to core files (through Opencart's OCMOD engine) so you don't actually need to edit these files (because of the way that OCMOD works, the files are never touched themselves) - but Opencart duplicates them to the system/storage/modification/ folder, with the appropriate changes (also found in install.xml); refreshing the modifications cache is all you'd need to do after disabling the extensions from the Extension -> Modifications menu to undo those changes to the core.

The version bump was fixed moments ago, I did indeed neglect bumping it on index.xml, so Opencart interpreted that as no new changes for this version, my bad.

Let me know if this version fixes your issues! 😄

I am glad it's working!

You should see both, 1.2.4 and 1.2.6 in your Modifications dashboard. I am not sure why, but Opencart does not delete the old ones.

You want to keep only 1 running (activated), otherwise you will see two links appear in your alerts menu when you have abandoned carts. Hit the red button beside 1.2.4 and it'll disable to old modifications code from being utilized on your site.

Once an old version is disabled, you can actually delete it from the modifications table via a database management tool like phpmyadmin, but it is not required.

Currently, that's the only way I am aware of to remove the old versions.
(Do not delete the files unless you wish to uninstall the extension completely; Opencart rewrites the old version of an extension's file, with the new version) -- so removing the files, removes the extension.

--
Some background info:

When you upgrade extensions, Opencart will show you what files are being replaced (files from the extension itself / 'Modules') - what the 'Modification' part of an extension does, is apply edits to the core; those edits are found in install.html

So obviously, you never want to have two of these core edits running changes at the same time!

As long as the old version of an extension is disabled, it is safe to ignore and/or delete.

a new version was released yesterday that should fix this numbering issue you experienced. 😃

Thanks Angela, keep you the good work!