Jump to content

Automatically refresh/activate imported modules after installation


operat
 Share

Recommended Posts

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

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 by horst
added link to somas ClearCacheAdmin
Link to comment
Share on other sites

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

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 by horst
  • Like 1
Link to comment
Share on other sites

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');

 

  • Like 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...