VQmod not working for open cart admin - migration

I am having the most frustrating issue with VQmod. I moved my OpenCart store from a Godaddy VPS to Rackspace's Cloud Sites. The move went fine and everything works properly except the VQmod's on the admin panel. None of them load. No errors in the log files, no admin cache files in the cache dir, no php errors.
Things I have tried:
Cleared all cache Changed admin folder to 755
reinstalled VQmod tried both manually and using the installer with fresh index.php files
Removed all XML files and tried to load only one at a time
Cursed loudly at my computer repeatedly.
Please Help! OC version 1.5.6 VQmod 2.5.1

For those that want the solution to this, the issue was that the config.php files were both using relative paths instead of the full paths for OpenCart's various directories. They should always be full paths, or resolved with realpath() in the config.php files themselves

My case was a bit different. I checked the permissions, paths, all the regular stuff that comes to mind first. I even walked step by step through the manual installation guide.
The Opencart copy in question is shared across several environments using git. Long story short, the mods.cache and checked.cache were not added to .gitignore right away, and when I finally did that, I emptied both of them just to make sure Opencart will write new content based on my current environment. Turns out, since mods.cache was empty, Opencart believed there are no mods available.
Solution: delete both vqmod/mods.cache and vqmod/checked.cache.
Update: here are some similar issues:
https://github.com/vqmod/vqmod/issues/32
https://github.com/vqmod/vqmod/issues/3
The vqmod/vqmod/wiki/Troubleshooting guide, as of now, does not make it obvious the files should've been deleted, neither does the vqmod/vqmod/wiki/Installing-vQmod-on-OpenCart, and there doesn't seem to be any way to contirbute. vQmod fails silently, without producing any notifications, warnings, or simply detecting the issue and rebuilding the cache files. I've spent few hours trying to figure out what's wrong.

Related

general question about node_modules and security

Can't find anything on this online and might be a non-issue, but I figured I'd ask here to make sure.
We run the Wordfence security plugin on a bunch of WordPress sites and have recently seen this "critical issue" reported:
Filename: wp-content/themes/theme-name/node_modules/webpack-assets-manifest/test/fixtures/client.js
File Type: Not a core, theme, or plugin file from wordpress.org.
Details: This file appears to be installed or modified by a hacker to perform malicious activity.
If you know about this file you can choose to ignore it to exclude it from future scans.
The matched text in this file is: require('./Ginger.jpg');
The issue type is: Backdoor:PHP/req_img.3645
Description: A backdoor known as req_img
Now first of all that doesn't look like a backdoor to me, especially since node_modules contents aren't executed unless I run npm (or yarn), as far as I understand. Is this more serious than I think?
Secondly, when running npm/yarn on the server, the node_modules folder has chmod 775 (drwxrwxr-x) by default. Is it okay to leave it like that or should we take any action?

Sylius Stylesheet Not Reloading

So here's a question. I'm new to Sylius, and am working on some simple CSS updates. I have a local copy of Sylius running with the built-in webserver: server:run. I also have a development server on Digital Ocean, which runs an (almost) identical copy of Sylius, aside from the configs of course.
Something strange is happening with my CSS update, however. I made a change to .navbar-brand within web/assets/compiled/backend_backend_4.css.
This change showed up immediately on my local. On the development server, however, when pulling down the change (git), and verifying that it now exists in that file, the change doesn't seem to propegate. It's effects aren't shown, inspecting the stylesheet doesn't show them, and furthermore viewing the css file sourcecode directly in the browser does not show the change. But on the filesystem it's definitely there.
I've tried clearing the cache, to no avail.
I also checked the assetic value in both config_dev.yml files, and verified they are both set to use_controller: true
Even still, I tried dumping assetic, to no avail.
So I'm wondering what's going on. Additionally, I realize that I probably shouldn't edit CSS files within a folder called 'compiled'. I'm sure there's a way to do that using a compiler, but I'm not yet familiar with the process and am just making minor changes and learning about caching so far.
Yes you are right you shouldn't be editing the compiled files.
You should edit the source files, then run gulp
or on my system i have to explicitly run npm run gulp
I've documented the solution that worked for me here. It didn't involve Gulp at all, but instead uses Assetic:
Assets need to be installed as hard copies first (I'm not quite sure
what this does exactly, but it seems like an important step because
it copies a lot of assets to places. Documentation was unhelpful but
it was suggested on Stack Overflow somewhere.):
app/console assets:install web
Assets should be edited in web/bundles/[bundle-here]/css or js. This
is frequently within syliusweb if it has to do with page styles /
layouts.
Hint: These assets are referred to in files such as
src/Sylius/Bundle/Resources/views/Backend/layout.html.twig (see the
opening:
(% stylesheets
tag, or search universally for this tag).
Within this tag, you'll see that stylesheets have an output to the compiled folder, but also list the
bundles where they pull their original css from. You should edit one of the source css files, if you'd like your changes to end up in the destination css.
After editing assets, dump assetic:
php app/console assetic:dump
Note - it is also possible to set an assetic watcher on these assets
(google to find out how, think it's a -w flag somewhere), but this is
said to only work in development mode, as it should.
After dumping assetic, the assets from the source bundles compile into their assets/compiled versions, usually combining multiple stylesheets. You should now see your asset refresh!

installing an extension using vqmod

I recently installed VQmod for opencart and I've tried to add my first vQmod xml file.
The VQmod installation was successful and I see the message
VQMOD ALREADY INSTALLED!
when I visit the /vqmod/install/ URL as expected
The extension I tried to install can be found here
I added the xml file to the root folder of my site and the /vqmod/xml/ folder but I don't see a change. No new module appears in the modules page and I don't see the extension working as expected. I also don't get any error messages
The file needs to be in the /vqmod/xml/ folder as you've rightly done (the root of the folder one can be deleted as it's not required). As for the mod not showing up, vQmods don't add modules to anywhere - they virtually edit files in certain spots. From the looks of the extension you need to go to CATALOG > PRODUCTS in your admin and then you will notice you can edit products there. A few of things to check
You are using the correct version for your OpenCart install and that it is compatible
If you don't, you'll need to get that version instead
You have files in /vqmod/vqcache/ and that if you delete them and refresh your OpenCart store, the files regenerate
If they don't, check the permissions on the directory and that you have the OpenCart version of vQmod, including the /vqmod/xml/vqmod_opencart.xml file
You have no errors from the mod (see /vqmod/logs/ followed by the day name such as Tue.log)
If you do, contact the developer to get a fix if they can. Remember that while vQmods can work well together, that depends largely on the competence of the developer to make it as dynamic as possible. Conflicts can always occur however
download the VQMOD from this link https://code.google.com/p/vqmod/downloads/list
upload the ZIP file (case of server)
extract the ZIP file and past root folder directory (in case of localhost)
exp (site folder name is shop (shoo/vqmod))
run on url (http:/open/vqmod/install/)
exit

Joomla 3.0: modul.js: $extend is not defined

I upgraded from 1.5.x to 3.0.x. During migration the new pages was setup in a separate directory, so the old one could be used without any downtime. After installing all required modules, templates and reorg of some structures I deleted the old page and moved all file from the subdirectory to the root directory. (In addition I change the configuration, so the subdirectory is no longer referenced.) Every thing went well and the user front end seems to be OK. Within the administration pages I have an major issue:
Any page that requires a modal panel (e.g. defining Images for Banners, defining menu items) throws an Javascript error and the page cannot be used:
Uncaught ReferenceError: $extend is not defined modal.js:368
(anonymous function)
Do you have any hint how this issue can be solved?
Thanks.
Karsten
Try re-uploading all files in the directory:
/media/system/js/
If the error persists or other error occur, consider uploading the Joomla core files again.
Please not that file by file FTP uploads are sensible to error. It's generally more safe to upload a zip and to unzip everything on the server (not to mention it's faster).
For those that aren't fixed by just re-uploading /media/system/js, this error can crop up for people who do an extremely far upgrade (like 1.5.x to 3.0.x mentioned by the poster) because "$extend" has been deprecated (and eventually removed) in mootools.
This means that your old extensions may be trying to use code that no longer exists in mootools. If you can find updates for the extension causing the issue, that's probably enough of a fix. If you can't, then it's usually easy enough to fix on your own...
The short fix for this bug is to change $extend to Object.append
Here is some more info about the upgrading mootools in general, which may help with other issues.
https://github.com/mootools/mootools-core/wiki/Upgrade-from-1.2-to-1.3-or-1.4

WIX: Saving off user data files during major upgrade

My application runs as a Windows service. During normal execution, some data files are generated in a "data" directory that I create with my WIX install. During an upgrade, I would like to move/migrate those files to the same data dir in the upgraded installation. However, I am running into issues. I am using the "MajorUpgrade" tag as follows:
I tried scheduling later in the process(afterInstallFinalize), but that runs into issues with the service having locks on files during the upgrade. I have combed Stack Overflow and google, and it seems that no one else is describing my scenario. Others have default *.ini files, that the user can potentially edit. However, in my case, it should always be safe to migrate the files, as there are no defaults. They are simply data files that need to be migrated.
I thought I could possibly do this via a custom action, but was not sure how to do it.
Any suggestions would be very much appreciated.
Edit: Apparently using "afterInstallFinalize" works fine for me, i.e. data files are migrated, as long as the user does not change the path during upgrade. If I change the path during upgrade, I get warnings about files being locked, and asking to stop the app using the files. However, it ends up not migrating the files in that case.
Ultimately, I solved my own issue by simply overriding the default dialog behavior, and changing the flow such that on upgrade, I skip over the "InstallDirDlg".