custom theme 1.0 upgrade to 1.1 dashboard problem?

Topics: Administration, Troubleshooting, Writing themes
Apr 13, 2011 at 1:40 AM

Orchard is cool. Version 1.1 is great! Nice presenetations at #mix11

I had created and am using a simple custom theme that I created begining with Orchard version 1.0 using these instructions that are still apparently for v1.0: "This topic was updated for the Orchard 1.0 release." http://www.orchardproject.net/docs/Writing-a-new-theme.ashx (in other words haven't been updated for v1.1 - if necessary)

The site updated OK, I'm using vs2010 and an FTP deploy. It displays as I would expect except that in the Dashboard widgets display the content placement legend that is new to v1.1 and would display below the All Layers: does not display when my custom theme is curent. I made the "The Theme Machine" theme v 1.1.30 current and the legend displays. Apparently the problem is in my custom theme.

As I recall I only made slight modification to the custom theme site.css and Branding.cshtml. I don't believe I modified anything in the layout.cshtml.

Do I need to basically start over and recreate the codegen steps etc. under v1.1 or has someone a suggestion for my customer theme created in Orchard v1.0 to work with my upgraded v1.1 site?

jeffa aka @jhalbrecht

 

Apr 13, 2011 at 7:54 AM

I would suggest you try to debug your theme with the new Designer Tools Modul. It helps me a lot by resolving similar problems.

Apr 13, 2011 at 8:54 AM

Unfortunately designer tools can't help you in Dashbaord yet ... but that legend is just a straightforward image that will reside somewhere in TheThemeMachine.

jhalbrecht did you set TheThemeMachine as the BasedOn theme for your custom theme?

Apr 13, 2011 at 10:08 AM
Edited Apr 13, 2011 at 10:11 AM
randompete wrote:

jhalbrecht did you set TheThemeMachine as the BasedOn theme for your custom theme?


Yes. When I made the custom theme way back in Orchard v1.0 I used "The Theme Machine" as the BasedOn theme to create my custom theme.

Thinking out loud / suggestion: It mMight be useful for the admin screen(s) to have their own theme that is 'bultin' and safe.

Apr 13, 2011 at 10:11 AM

Hmm, I'm not sure why it doesn't get picked up.

I think the file you are looking for is ThemeZonePreview.png in TheThemeMachine's root directory. Try copying that to your theme.

Apr 13, 2011 at 10:37 AM
randompete wrote:

I think the file you are looking for is ThemeZonePreview.png in TheThemeMachine's root directory. Try copying that to your theme.

I copied the ThemeZonePreview.png to my custom theme. The Dashboard Widgets area appears to display corectly now.

I also see a file 'Placement.info' in "The Theme Machine" that is not in my child theme. Should I copy that as well?

I do wonder if some as yet unknow and undisplayed problem may show up on down the road. What about files such as .dlls in the obj and bin folders of my custom theme?

Feedback for Orchardcms project. Should this be covered programatically and/or have the update documentation modified to include custom them changes? And enhance the instructions for creating the custom theme updated?

randompete Thank you for your help.

 

Apr 13, 2011 at 10:45 AM

Normally files are discovered hierarchically so anything in the base theme will be applied to your theme, and overridden if it's also contained in your theme.

I don't know why it's not working for the ThemeZonePreview.png, this sounds like a bug in the way the image is getting displayed and you might want to raise a workitem in the Issue Tracker.

Placement.info should definitely be getting applied and you could test this by temporarily changing one of the Place values to "-" to see if that shape disappears.

I'm not totally sure what you mean by "as yet unknown and undisplayed problems" but of course 1.1 is a brand new release and there are bound to be bugs yet to be discovered :) What are you asking about dlls in the theme?

Also what do you mean by feedback covered programatically, are you suggesting a feedback form contained within the admin UI? These forums and the Issue Tracker are the places for feedback and bug reports, I think having a system rolled into the Dashboard might discourage people from first looking for an answer or existing workitem before reporting issues.

Coordinator
Apr 13, 2011 at 5:41 PM

Can you file a bug for the preview image not being inherited? I've updated the http://orchardproject.net/docs/Anatomy-of-a-theme.ashx doc topic to present the preview image.

Apr 13, 2011 at 7:23 PM
randompete wrote:

Also what do you mean by feedback covered programatically, are you suggesting a feedback form contained within the admin UI? These forums and the Issue Tracker are the places for feedback and bug reports, I think having a system rolled into the Dashboard might discourage people from first looking for an answer or existing workitem before reporting issues.

Sorry for any confusion. I was not suggesting feedback in the admin UI.

I was suggesting that perhaps the admin menus would have a 'safe' theme, or lack of theme, that does not change based on site themes. That way if a theme was broken in some manner it would not impact the ability of the admin screens to display and the site be administered.

Apr 13, 2011 at 7:26 PM
bertrandleroy wrote:

Can you file a bug for the preview image not being inherited? I've updated the http://orchardproject.net/docs/Anatomy-of-a-theme.ashx doc topic to present the preview image.


Filed. http://orchard.codeplex.com/workitem/17730

Apr 13, 2011 at 9:06 PM
jhalbrecht wrote:

Sorry for any confusion. I was not suggesting feedback in the admin UI.

I was suggesting that perhaps the admin menus would have a 'safe' theme, or lack of theme, that does not change based on site themes. That way if a theme was broken in some manner it would not impact the ability of the admin screens to display and the site be administered.

Ah I see - well basically the Admin theme is that safe theme, it's completely separate from TheThemeMachine. It pulls a limited amount of information from the current theme and one of those bits is the zone layout image. But most of it doesn't inherit (sorry my post slightly confused this issue)

The thing is, a theme can define whatever zones it wants, so that image is only correct for TheThemeMachine and anything that inherits from it (although even inheriting themes could completely change the zones)

Hope that makes sense!