AppExchange Package Upload to Include Custom Themes

So to confirm your onInstall method looks like this:

public void onInstall(InstallContext ctx) {
        IsRunning=true;
        RefreshPagesInModule(NAMESPACE_PREFIX);
        CreateDefaultThemes();
        IsRunning=false;
    }

But when you run this, your Themes are created but Pages are not updated or modified?

If that’s true, which is bizarre, I would try removing the call to CreateDefaultThemes(); from onInstall and then uploading a new version of your package and then trying to install it and see if your pages get updated as you’d expect. Basically go back to making sure that the page modifications are working as expected, then re-introduce the CreateDefaultThemes() part of the equation. I think it will be important in troubleshooting this to first establish that both routines are running as expected independently, then testing them running in conjunction. My guess is that something is preventing the RefreshPagesInModule functionality from working that is unrelated to creating default themes. But it is difficult to say.