Main issues -
1. The install and configuration guide pages on the OpenCart site call for renaming the admin folder as a highly recommended action (I agree with that). However this breaks the modifications installer for ocmod extensions.
1a. If the ocmod extension contains a folder and file set for /admin/ in the upload folder, the main extensions installer does not redirect the upload to the renamed admin folder, instead it creates a new folder called admin and sends the upload there.
1b. The extensions installer does not recognise the renamed admin folder for actioning the install.ocmod.xml file and fails without errors leaving no addition of links and settings in admin for the uploaded extension - also no addition of the extension to Users - User Groups - for setting access and modification permissions.
There are some workarounds I have found through trial and error, but they are not a long term solution and they are certainly not recommended if OC is building towards a WordPress-style solution where modifications can be downloaded and installed direct from the OpenCart repository from within the modifications installer ...
2. Download the extension to your local hard drive and unzip it.
- rename the admin folder to your new name for admin (e.g. if your admin folder is called rottentomato then use the same name to rename the admin folder in the extension package.
- make sure the install.xml is called install.ocmod.xml (I have found too many 2.0.1.1 extensions without this)
- re-zip the package with its original name
2a. upload via the extensions installer and refresh the modifications cache
- first thing you will most probably notice is that EITHER the left menu link in admin does not display where it should be AND / OR the permissions checkboxes in Users-User Groups are missing.
- open the install.ocmod.xml file on your local hard drive ... now hard code the changes into the files and places on your server install that are indicated in the XML code.
- go back to the modifications list page in admin and refresh the modifications cache ... several times - it does not always "take" on the first attempt.
- go back to Users-Users Groups and look for the permissions checkboxes, they should be there now, tick them and save, then back to modifications to refresh the cache several times again.
- now look throughout the left hand admin menu for the settings page link - if it's not there, refresh the cache and if still not there, check again next week when it will mysteriously appear in some illogical position ... at least that's how I've experienced it.
Hope it helps someone, especially the OC Devs - take a look at how vqmod handles renaming the admin folder - ocmod needs something similar.
edited to fix typos
OCMobi - Opencart 1x and 2x native mobile applications, developer SDKs, Rest API, and custom services. Email us at support@ocmobi.com!
Pricing | Features | Custom Services
Facebook | Twitter | Google+ | Instagram
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
It should be an admin panel field where you can write what is your admin folder called at.We're not mind readers. No offence, but how are we, as developers, supposed to know what you've renamed your admin folder to?
This would be the easiest way (for users) to tell opencart what they call their admin folder.
TLEwebdevs: I am quite a sure that there is OpenCart file where developers have commented place where you can change what your admin folder is named. I can't remember where and what file it was but I have seen it on somewhere.
You can whitelist ips for your admin section, you can add some vqmod/ocmod to use a key/pass combo on the url ie admin/index.php?key=blah otherwise redirect to the front end so it's as if it's hidden, add brute force protection to admin login, add captcha to admin login, and etc.
So if your motives are security there's other better options than potentially breaking Opencart. Many other systems don't have built in features to change admin folders while some don't care what you call admin folders. It doesn't really matter, it's not the holy grail of solutions to combat security issues...
OCMobi - Opencart 1x and 2x native mobile applications, developer SDKs, Rest API, and custom services. Email us at support@ocmobi.com!
Pricing | Features | Custom Services
Facebook | Twitter | Google+ | Instagram
Yes, vQmod supports a renamed admin folder, as long as you install it BEFORE renaming the admin folder, otherwise you get the above message and vQmod is not installed at all (even on the front-end). You would also have to edit every vQmod .xml file and replace any reference to the old admin folder with the new folder name.Administrator index.php not writeable
Don't get me wrong, vQmod is a GREAT add-on and, if I wore a hat, I'd take it off to Qphoria for developing it!
However, while the OP is correct when stating that OCMOD does not support a renamed admin folder, it doesn't change the fact that we, as developers, have no way of knowing what the admin folder has been renamed to. There is no way of "automagically" detecting it.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
OCMobi - Opencart 1x and 2x native mobile applications, developer SDKs, Rest API, and custom services. Email us at support@ocmobi.com!
Pricing | Features | Custom Services
Facebook | Twitter | Google+ | Instagram
Yes but you just need to rename the admin folder temporarily to "admin".. then run vqmod installer and then change it back. You don't need to edit the config files or anything. It's extremely minor.fido-x wrote: Yes, vQmod supports a renamed admin folder, as long as you install it BEFORE renaming the admin folder.
This is completely untrue and we should do better to advertise proper use.fido-x wrote: You would also have to edit every vQmod .xml file and replace any reference to the old admin folder with the new folder name.
Since vQmod 2.3 (about 2 years ago), Jay added the "pathReplaces.php" file which lets you set up a translation from "admin" to "whatever" in one place, one time. So you DO NOT need to edit ANY files. It will automatically translate the path without needing to change any xml files. More Info
Never underestimate vQmod again!
Have a look at the WordPress open source code - how do they do it?fido-x wrote:We're not mind readers. No offence, but how are we, as developers, supposed to know what you've renamed your admin folder to?
(Simplistic answer - they have you rename it during install then commit that name somewhere in the database, or possibly in the .htaccess file ... possibly in plain text, possibly encrypted, I never looked deep into it because it works).
They also have you change the database tables prefix from "wp_" to whatever you like within MySQL's restrictions during install, and that is written to the config.php file during the install.
There are easy ways and hard ways to do this, and I'd suggest there's a large proportion of OpenCart users who are not code-jockeys, therefore the solution should be as easy to use and interaction-free as possible.
As someone completely new to OpenCart and vQmod, it took me almost a week of hair pulling to discover the pathReplaces.php solution - could I ask that you comment it into the mod description in the opencart repository, and into a readme.txt within the mod package? Please, pretty please? It might save future users some angst.Qphoria wrote: This is completely untrue and we should do better to advertise proper use.
Since vQmod 2.3 (about 2 years ago), Jay added the "pathReplaces.php" file which lets you set up a translation from "admin" to "whatever" in one place, one time. So you DO NOT need to edit ANY files. It will automatically translate the path without needing to change any xml files. More Info
Never underestimate vQmod again!

Is there a checklist anywhere for ALL the places that need updated? I couldn't find one linked from the installation pages on the site.ocmobi wrote:Are you sure you updated your configs properly and changed all pathing on the site and in other areas to reflect your file system changes?
Click the orange "Clear" button to clear the modification cache. Click the blue "Refresh" button to refresh the cache.kombi wrote:looks like it stored in the database under "modification" so how do you easily delete and flush the opencart cache to clean it out? VQMOD you just delete the cache folder?
If your modifications are preventing access to the "Extensions->Modification" page in the admin, you can use the file manager from your hosting control panel to clear the files in the "system/modification" directory. Note: DO NOT delete the "index.html" file.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
I've changed the name of my admin folder and sometimes experience incomplete extension installs using OCMOD - usually the upload step says "successful" but then the mod does not appear in Admin - so can't get beyond that step.
I have 2.03.1 + VQMOD + OCMOD... now with renamed ADMIN... It's not a problem at all...alber99 wrote:Is this still a problem in OC 2.0.3 ?
I've changed the name of my admin folder and sometimes experience incomplete extension installs using OCMOD - usually the upload step says "successful" but then the mod does not appear in Admin - so can't get beyond that step.
Follow Q's tutorial to the letter, see this post:
http://forum.opencart.com/viewtopic.php?f=121&t=93109
Implemented 2 days ago, works perfectly.
Hosting for Oc 2.x: Well tested on 2.03.1 including emails work correctly, cPanel Shared or WHM VPS, managed security, fast & reliable SSD drives, Raid 10 /4 disk redundancy, server locale - Texas, contact me to discuss further.
Users browsing this forum: No registered users and 3 guests