Hi,
I have been trying to create a theme based on the luma theme. I have successfully created the new theme, but once I switch over to the new theme, the sample data does not show up any more. Do I have to change settings somewhere? In my theme.xml I have the luma set as parent theme.
Thanks Dan
Could you be more precise about "does not show up"? I have been playing with themes myself with Luma recently myself. I can still search and find products. It does not really make sense that switching theme would remove products from the database etc. I would first check you are talking to the same web server/database combination.
Otherwise, can you describe the steps you used to enable the theme? Maybe one of the commands accidentally wiped the database contents (because you ran the wrong command).
@alankent So I followed the create new theme as described here http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-create.html
I created my folder system like this..

In my theme.xml, I set the parent theme as Magento/luma
Then changed the theme design in my admin, cleared all cache and removed pub static files.
It is at that point, no products show up or images at all. I was hoping to keep the luma theme in tact while making some modifications to suite our needs. Really just playing at this point, but trying to get a handle on it.
Thanks
Could you try the following steps:
Things I am wondering: is contents still in DB, were images accidentally deleted when you flushed caches, etc. The above will hopefully narrow down options here.
Thanks
@alankent - Thanks for helping.
-- Put in Magento Luma and all images and products show
-- Search in Luma theme for red shows products
-- Search in Poly/main shows products when searching for red.
What is missing is homepage, category imaging and other theme related images. If I have my new theme as set to have the Magento/luma as parent, shouldn't it be that I would see the exact luma theme using mine?
Ah, OK - gotcha. So the products are still present in the database. I understand what the issue is now, but need to chase up some internal details so I give you a correct response. Feel free to ping me in case I don't get back to you in a few days. (The issue relates to the relationship between CMS blocks and theme inheritance.)
First, we do not recommend inheriting from the Luma theme. We reserve the right to change this theme at any time. It is our demo. We only recommend inheriting from the blank theme.
That aside, I was trying to work out if there was an immediate solution to see if we had a functionality gap. Bottom line: no. We are going to think about it more to see what we can do (but no promises at this stage).
The issue you are seeing is because the Luma demo store experience is more than just the Luma theme. It also uses CMS functionality to populate the home page and other places. CMS functionality is not defined via themes - our sample data fixtures load up CMS content as well. The CMS widgets are currently linked to a specific theme name. There is no inheritance supported (today) in the CMS linkage with the theme. This is one thing we are reviewing. The bigger question is whether themes should be able to define CMS blocks etc. That is a much bigger question, but we have some CMS review work coming up. Don't expect a quick answer on that one. (Theme developer community feedback on that one would be interesting!)
If you want to make it work today, you can, but not just using a theme. You need to go into the "Content" section, then look at each "Frontend App" (aka CMS Widget) that is associated with the "Magento Luma" theme. Today, you need to create a clone of the Frontend App associated with your new theme name. Then it will work today. (The CMS blocks don't need duplicating, just the frontend apps as they are the part bound to the currently selected theme name.)
@alankent
Excellent explanation...thank you.
I was really just following the video on the Magento 2 dev pages. I was also just playing around with the theme to get familiar with how to modify things.
I see your point on the Frontend Apps, but in the admin the section it is grayed out to give you the ability to change themes. Is that the reason why they need to be duplicated?

@danielc1234 indeed, that's why you need to make new ones with the exact same settings except for the Design Package/Theme. A duplicate button would be a nice addition though.
We ran into the same thing when creating our theme, even the content on the category image disappeared where I expected it to be configured in the category section (display static block & products) but after inspection, they were front-end apps, aka widgets in Magento 1.x
I would be interested in understanding what theme developers would like to be able to do in addition to what we have. For example, if there was a (PHP/view element) block you could put in a layout file to access CMS Static Block content, would that be useful/sufficient? Or do themes not need to touch CMS blocks etc? (This is not for GA - this is for the future.)
@alankent : That's actually what we're using now in our own base Magento 1.x theme as well to load static blocks that we always use in our projects (client theme with our own base theme as parent). We'll be adding this to our (WIP) Magento 2.x base theme as well.
We only need to put the actual static blocks in the database for this to work after applying our theme. We'll be looking for an automated task to create these blocks too, to be even more efficient.
Having a widget example with static blocks in the demo theme is a good thing though, to show what it can do. But since it's theme dependant (and not changeable without making a new frontend-app (I need to get used to the name :)) it's a bit confusing for very new front-end developers messing around a bit.
Thanks for the feedback.
Warning: Don't get hung up on the name "Frontend-app". We are reviewing the name internally because the underlying code and UI concepts appear to be named differently. I personally dislike this - change names everywhere or nowhere is my moto. But every change as we close in on GA, no matter how minor, needs more careful thought due to potential impact. (So we would be unlikely to change the code, only the naming on the UI.)
The GitHub issue tracker is intended for technical issues only. Please refer to the Community Forums or Magento Stack Exchange site for technical questions. In your case, the programming questions forum is likely the most appropriate. Feel free to reopen this issue if you think you have encountered a bug in Magento 2.
What? this even breaks with the blank theme that comes with magento2. How is this not an issue?
Most helpful comment
First, we do not recommend inheriting from the Luma theme. We reserve the right to change this theme at any time. It is our demo. We only recommend inheriting from the blank theme.
That aside, I was trying to work out if there was an immediate solution to see if we had a functionality gap. Bottom line: no. We are going to think about it more to see what we can do (but no promises at this stage).
The issue you are seeing is because the Luma demo store experience is more than just the Luma theme. It also uses CMS functionality to populate the home page and other places. CMS functionality is not defined via themes - our sample data fixtures load up CMS content as well. The CMS widgets are currently linked to a specific theme name. There is no inheritance supported (today) in the CMS linkage with the theme. This is one thing we are reviewing. The bigger question is whether themes should be able to define CMS blocks etc. That is a much bigger question, but we have some CMS review work coming up. Don't expect a quick answer on that one. (Theme developer community feedback on that one would be interesting!)
If you want to make it work today, you can, but not just using a theme. You need to go into the "Content" section, then look at each "Frontend App" (aka CMS Widget) that is associated with the "Magento Luma" theme. Today, you need to create a clone of the Frontend App associated with your new theme name. Then it will work today. (The CMS blocks don't need duplicating, just the frontend apps as they are the part bound to the currently selected theme name.)