Vqmod XML not loaded

Source: Internet
Author: User
Tags file diff require

Originally did not intend to understand vqmod, but in the installation of the template problem, the installation has always failed to check the reason, found that the new XML file is not loaded.


Cause: The newly added XML file timestamp is less than the cache file Vqmod/mods.cache generated by Vqmod.

Vqmod/mods.cache is used to cache XML files, vqmod at load, will traverse the XML directory, and get all the file Maximum file modification time, next, if this modification time is less than Mods.cache file modification time, the XML file list will not be refreshed, That is, after the XML file is added, if the modification time is not after mods.cache, it is not valid at all.

Knowing the reason, the solution is simply to delete the Vqmod/mods.cache file.


Solve the problem, a simple understanding of the vqmod, in fact, for a source code does not change the PHP site, Vqmod is not necessary, but, for the custom requirements of the code, in the upgrade, can be as far as possible to retain the user-defined part is not affected, I think, this should be why Vqmod's biggest starting point.


Vqmod idea is very simple, it is equivalent to a source code version management of the small system, the core is the file diff definition, that is, the XML file definition in Vqmod, it can be based on the definition of the XML file, generate a new version of the source code files, and then take over require, include directives, will The load file points to the newly generated source code file.

According to this principle, the wiki in the official website also shows that to use vqmod, preferably with a framework of the project, all the require, include are in the framework, not scattered in the business logic code, otherwise the cost of modification is higher. So, in OpenCart, the code load is basically loaded with $this->load->model (' xxx ') instead of using require directly.


In summary, according to its principle, if an error occurs, it is basically a directory permissions problem, or an XML definition file problem.

In addition, the XML file can be produced using tools, in fact there is no need to manually write, on the wiki, the author provides two of the build tools.

There is both tools we recommend to help create Vqmods if you don't want to edit them manually uksb ' s vqgenerator Avanosch ' s vqmoderator Both is completely free and open source

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.