HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Error when using the Theme Wizard

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#73351 (In Topic #15346)
Avatar

Community saint

I get the following error when using the Theme Wizard to create a new theme based on my custom theme:

Code

The following colour equations could not be resolved, most likely because required colour(s) were not defined anywhere, or because mathematically, there is no solution:
wizard, 100% medborder.border; wizard, 50% bordcolor + 50% W/B ; wizard, 95% bgcol + 5% !W/B; wizard, 100% lightborder. (version: 7.1.3, PHP version: 5.2.17, URL: /adminzone/admin_themewizard/step2.htm?themename=XXXXXXXXX2&seed=74771e&source_theme=XXXXXXXXX&algorithm=equations)

Here is the stack trace:

Below is a stack trace revealing the state the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check ocPortal website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.

File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/sources/failure.php'
Line    '669'
Function    'get_html_trace'
Args   

File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/sources/global2.php'
Line    '936'
Function    '_fatal_exit'
Args   
object


File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/sources/themewizard.php'
Line    '840'
Function    'fatal_exit'
Args   
object


File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/sources/themewizard.php'
Line    '627'
Function    'calculate_dynamic_css_colours'
Args   
array ( 'dark' => '0', 'seed' => '74771e', 'red' => '116', 'green' => '119', 'blue' => '30', 'dominant' => 'green', 'WB' => 'FFFFFF', 'AWB' => '000000', 'LD' => 'light', 'ADD' => 'dark', 'W/B' => 'FFFFFF', '!W/B' => '000000', 'L/D' => 'light', '!D/D' => 'dark', )

'XXXXXXXXX'


File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/adminzone/pages/modules/admin_themewizard.php'
Line    '179'
Function    'calculate_theme'
Args   
'74771e'

'XXXXXXXXX'

'equations'

'colours'

false


File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/adminzone/pages/modules/admin_themewizard.php'
Line    '72'
Function    'step2'
Class    'Module_admin_themewizard'
Type    '->'
Object    Module_admin_themewizard::__set_state(array( ))
Args   

File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/sources/zones.php'
Line    '386'
Function    'run'
Class    'Module_admin_themewizard'
Type    '->'
Object    Module_admin_themewizard::__set_state(array( ))
Args   

File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/sources/site.php'
Line    '962'
Function    'load_module_page'
Args   
'adminzone/pages/modules/admin_themewizard.php'

'admin_themewizard'


File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/sources/site.php'
Line    '749'
Function    'request_page'
Args   
'admin_themewizard'

true


File    '/home/XXXXXXXXX/public_html/XXXXXXXXX/adminzone/index.php'
Line    '51'
Function    'do_site'
Args   

These are the settings I used to attempt to create the new theme:

Seed color: 74771E
Source theme: My custom theme
Algorithm: Equations
Dark theme: Unchecked
Inherit CSS from default theme: Unchecked

This works properly if I use the default theme as a source. I am surprised that there would be an issue since my custom theme is basically the default theme with just a handful of changes.

Is the only solution to use base it off the default theme and then re-implement all my changes.

Anyone know a way to make this work using my custom theme as the source?

Bob
Back to the top
 
Posted
Rating:
#73352
Avatar

It's what it says. Specifically, if you've removed some of the {$,...} stuff that is defining some of the intermediary values in the equation resolution process, it cannot complete.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73353
Avatar

Community saint

So I could create the new theme based off of the default and then implement my changes into the new theme.

I can then export this theme from my development site and import it into the main site (which has identical code) and everything should just work fine?

Thanks for your help.

Bob
Back to the top
 
Posted
Rating:
#73354
Avatar

Yes, but isn't that what you were doing?

All I'm saying really is the equations are quite intricate/specific/needed. The ones with a name anyway.
E.g.
{$,red_highlights, 80% FF0000 + 20% seed}
This defines an intermediate value 'red_highlights' as well as assigning it to the CSS colour spot to the left of the expression. Other equations may then use 'red_highlights' inside the equation (just like 'seed' is in this one). The Theme Wizard does a rather complex mathematically solution process, which obviously fails if values are referenced but no longer defined anywhere.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73355
Avatar

Community saint

Chris-

Are these bits of code in TPL or CSS files? Would the best solution just be to make sure any code like your example is added back into the appropriate files?

As of now I have created my new theme based on the default and then I ran the Integrity check from the Upgrader to identify any files in my previous 'custom' theme and figured I can just diff those against the manual install files and make the same changes in the new theme.

Bob


Back to the top
 
Posted
Rating:
#73356
Avatar

It's all in the CSS.

E.g. it says it cannot resolve "wizard, 100% medborder.border" which means "medborder.border" must not be defined. Looking in the default global.css I can see it is defined via a standalone define (as it's one of the fundamental values we use in various files):

Code

/* {$,medborder.border, 95% (seed sat_to 33) + 5% !W/B} */


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#73357
Avatar

Community saint

Thanks for taking the time to explain this, Chris.

Surprisingly, there was no global.css in my previous 'custom' theme; I guess it was drawing those values from the Default theme. I added the global.css file to the previous custom theme (with my one change) and the Theme Wizard ran like a champ and created a new theme with my new colors.

I just need to double-check that all my changes carried over.

Again, thanks for your patience explaining this.

Bob
Back to the top
 
Posted
Rating:
#73359
Avatar

Community saint

I am just learning how the theme wizard works myself because I really want any themes I release to work properly with it so take this tip at face value and please correct me if I am wrong.

This may or may not be helpful or relevant, just an observation from experimenting.

When creating a new theme if you start with the default theme and change the color with the theme wizard leave all theme wizard color equations in tact and do not drastically change any of the color values the theme wizard produces. If you do then when you run the theme wizard again it will work but the equations don't match so it produces some really odd looking results.

A good example of that is my blue and grey theme. It does work with the theme wizard but I drastically changed some of the color values the theme wizard originally produced. It looks nice as it is but if you try to change colors with the theme wizard….interesting results but ugly as hell lol
Back to the top
 
Posted
Rating:
#73360
Avatar

Community saint

Brian-

I was fortunate that the 'custom' theme I was using was just the copy of the default theme created at installation with a few changes.

I have come across two issues where the Theme Wizard was less than magical.

The first is that the extension of the Zone Menu bar under the logo is the wrong color. I thought this might be fixed by running the Logo Wizard but it produces the same results. I will be creating a new logo for the site so this is not a big deal to me but it may be something that the developers want to address:


The second issue is that I lost the rounded corners on the IOTD block. I am guessing that the developers would want to address this:


Thanks for explaining the potential issues when running the Theme Wizard over a theme already created by the Theme Wizard.

Bob

EDIT:  Nevermind - it appears to be working properly now. I know I cleared the caches several times but I am thinking that I may have forgotten to clear my browser cache. Geez, I'm getting tired of making myself look like an idiot.  :sinner:


Last edit: by BobS
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: