Change theme instance

When I work with themes in Shopify I usually make a copy of the currently active theme, make modifications to the copy, test/verify and then publish the new version. This give me sort of a history and the possibility to rollback if there is a problem.

My understanding is that when installing Algolia and clicking the “Install to a new theme” button in the Algolia Shopify app, Algolia injects files and code into a theme as well as registers the name (or id) of that theme for future reference. The name of the theme is displayed in the “Active Installation” section of the Algolia app. When changing the configuration (store configuration and search options) the changes are written to the algolia_config.js.liquid file in the registered theme.

Now to my problem. I have not found any way to change the “Active installation”, why there is no way to use my workflow described earlier. If I click the waste basket, the algolia stuff is removed from the theme. If I try to “Install to a new theme” using my copied theme (where Algolia already is installed), the app hangs(!)

Is there a way to change the active theme? If not, maybe it should be added?

The workflow we expect is actually exactly the one you described.
Install us once in your main theme copy, preview it and modify it until it fits your needs, then set it as live.

Publishing a theme as live doesn’t modify the synchonization with algolia_config.js.liquid, so when you’ll change options afterwards, we’ll continue updating the file in your theme which is now live.

The app hanging is definitely unexpected. It can take a bit of time (I’d say up to a minute) to fully install in your theme, but shouldn’t really take more.
If this happens again, can you please ping me again in this thread and include:

  • your store subdomain
  • the theme name or id of the one you’re trying to install us into

Sorry, I was not clear, the problem arrises in the next iteration.

Assume I am using Theme-1 as my live theme on the site. I make a copy, Theme-2 and install Algolia on it. When satisfied I publish it and all is good.
Now I want to modify the theme and make a copy of Theme-2, called Theme-3. Eventually Theme-3 is published and becomes the live theme.
When making configuration changes in the Algolia app, the config file in Theme-2 is still updated and not in the active Theme-3.

I’m sorry I missed the notification on this one and didn’t answer @krichardsson .
There’s actually a way to link a theme to the app without overriding everything.

You can launch the Install in a new theme process.
If you select Theme-3 and go forward, it will show you a list of conflicts.
But if at this stage, we detect a file called assets/algolia_config.js, we’ll automatically link our app to your theme, even if you cancel the process.

By linking here, I mean that we will override the config file any time you make a modification in the app afterwards.

OK, I’ll try it out


As a follow up to this, you don’t need to go through the hack described here to update algolia_config.js.liquid anymore.
Under the list of installed themes, you’ll see a Synchronize button.
Simply click on it for us to detect all themes in which Algolia is installed and update algolia_config.js.liquid files in those we didn’t track anymore.

Great, thanks for the info!