We need to start developing our site's next theme asap, as we have a need to get it launched asap. The old one is in Omega 3, and we are going to do the new one in Omega 4, so we move forward with the latest and forward looking Omega version. To that end, I have a few questions I'm hoping someone can answer soon; here's the first question:

Is it possible to have Omega 4 and Omega 3 residing in the same Drupal codebase? They both are just provided in the folder "omega". I tried once, putting v4 in sites/default/themes, since v3 was in sites/all/themes. We immediately got all sorts of WSODs, errors about omega components being missing, etc., so we removed v4 and everything was wonderful again.

Ideally, we'd like to do this somehow: I want to enable a v4 sub-theme for myself and several other stakeholders, so when we login, we can see the new theme and we can continue to see it develop; while regular users and anon users just see the site using our good old fashioned current Omega 3 theme.

Is this possible?

Comments

fubhy’s picture

Omega 3 and 4 can normally NOT co-exist because they both share the same namespace and due to the way the module/theme discovery in Drupal works this (nearly randomly) causes either the 3.x version or the 4.x version to be discovered (depending on where they are placed basically). The only way to solves this would be to write a module that leverages hook_system_info_alter() to explicitly select either theme A or theme B. In any case, this would not solve your problem because the system info is neither user specific nor is it possible to alter it on every request as it is cached. At least not without major hacking with things like hook_boot() etc. to manually inject the system info. I have seen this being requested a few times now already so I will take a look and try to make this possible with an upgrade support module.

Stay tuned.

fubhy’s picture

Status: Active » Closed (won't fix)

I am sorry, this turns out to be _incredibly_ hacky (if possible at all). I guess you have to set up a copy of the site that uses 4.x. To be honest, that's what you should do anyways. Your first post basically sounded like you were working on the live site? In any case, the answer for now is: Set up a copy of the the site on your local dev environment and build the 4.x theme there.