operat Posted September 28, 2016 Share Posted September 28, 2016 When logging in to a new ProcessWire instance that was freshly installed with a site profile exported from another instance (contains modules, settings etc.), all the imported modules are not active. The modules are there, but not recognised by PW. You have to manually refresh PW via Modules > Refresh. I find this rather uncomfortable. It would be very useful, if you wouldn't have to think of additional steps after a "successful" installation; if you could simply install PW, throw a site profile at it and would be ready to go. Is there a way to achieve an automatic modules refresh after installation or after initial login? Thanks for your help! Link to comment Share on other sites More sharing options...
horst Posted September 28, 2016 Share Posted September 28, 2016 (edited) If you choose a manually installation, I think you just has to manually go through all steps until the end. If you feel uncomfortable with this, you may create a site profile on your source website, and install a fresh PW with this site profile on your new destination site. This way, every thing is done for you automatically. The way with simply manually copying a site profile to a new destination does include a manually update of the DB and a manually refreshing of all caches. PS: another goody in this regard comes from @Soma, currently not available in the modules directory: https://processwire.com/talk/topic/13042-clearcacheadmin/ PPS: maybe, it is possible to create a little bootstrap script, that execute somas modules cache refreshing? Edited September 28, 2016 by horst added link to somas ClearCacheAdmin Link to comment Share on other sites More sharing options...
Soma Posted September 28, 2016 Share Posted September 28, 2016 I think it should happen automaticly after the install from a profile. My guess is that the profile export-import possibility (haven't used it in ages) was made/built before processwire used module caches. My module isn't meant for system cache like the module cache, but rather the various template caches. Since there's already a handy refresh modules button/function. Link to comment Share on other sites More sharing options...
horst Posted September 28, 2016 Share Posted September 28, 2016 (edited) Just to clarify: with the profile export module and than installing on a new site with this (exported) profile works well! (there is no need for refreshing any thing manually). Only when one simply copy a site folder from one server to another, (= manually install) then you have to manually install a mysql dump and manually refresh the modules cache. Edited September 28, 2016 by horst 1 Link to comment Share on other sites More sharing options...
horst Posted September 28, 2016 Share Posted September 28, 2016 Another way could be to just remove the lines from the mysql dump, where it populates the caches table. Let the creation of the table in the dump: DROP TABLE IF EXISTS `caches`; CREATE TABLE `caches` ( `name` varchar(128) NOT NULL, `data` mediumtext NOT NULL, `expires` datetime NOT NULL, PRIMARY KEY (`name`), KEY `expires` (`expires`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; But remove all following rows that insert data: INSERT INTO `caches` (`name`, `data`, `expires`) VALUES('Modules.info', ... , '2010-04-08 03:10:10'); INSERT INTO `caches` (`name`, `data`, `expires`) VALUES('Permissions.names', ... , '2010-04-08 03:10:10'); INSERT INTO `caches` (`name`, `data`, `expires`) VALUES('ModulesVerbose.info', ... , '2010-04-08 03:10:10'); INSERT INTO `caches` (`name`, `data`, `expires`) VALUES('Modules.site/modules/', ... , '2010-04-08 03:10:10'); INSERT INTO `caches` (`name`, `data`, `expires`) VALUES('ModulesUninstalled.info', ... , '2010-04-08 03:10:10'); 1 Link to comment Share on other sites More sharing options...
Robin S Posted September 28, 2016 Share Posted September 28, 2016 5 hours ago, horst said: Just to clarify: with the profile export module and than installing on a new site with this (exported) profile works well! (there is no need for refreshing any thing manually). I get the same issue as the OP when doing a new PW install with a profile saved by the ProcessExportProfile module - often I'll see module errors or warnings until I refresh the module cache. Doesn't really bother me as it just becomes part of my routine when doing a new installation, but it would be nice to cut out this step. Link to comment Share on other sites More sharing options...
horst Posted September 29, 2016 Share Posted September 29, 2016 Ok, I think the Profile-Exporter shouldn't include the values for the cache table, as mentioned in my post above. One of us should raise an issue on the modules github site. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now