I discovered, that Magento2 (1.0.0-beta2) is not storing the theme name (like Example_default) but an id in the system configuration:

$ n98-magerun2.phar config:get "*theme*"
| Path                   | Scope   | Scope-ID | Value  |
| design/theme/theme_id  | default | 0        | 4      |

There is a database table theme containing this theme id:


My question: What would happen if I insert a new theme? Can it also get the ID 4 - for example when clearing the cache - and so suddenly switching the theme of the shop?

  • You mean updating the row with ID 4 with a new theme path ? – Rabea Oct 26 '15 at 18:22

I would be wary of depending on this table too much. We have some possible upcoming work on themes to tidy a few things up. We were going to do a visual design editor, but that is not likely to happen any time soon. That raises the question whether we really need to both register themes via Composer and the registration.php file, and via a database table. No decision yet, but one possible outcome is to drop the database table completely.

Why do you want to access the table directly? What problem are you trying to solve?

  • It kind of was a theoretical question / I thought I spotted a shortcoming there. But if the fact, that it could cause trouble, is anyways known to the core-team I am fine. – Alex Dec 10 '15 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.