Needs review
Project:
Corporate Clean
Version:
7.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
14 Mar 2012 at 11:01 UTC
Updated:
17 Nov 2015 at 03:46 UTC
Jump to comment: Most recent
When I try to subtheme corporateclean i have trouble with search block.
Function in teplate.php search image in my theme.
$form['actions']['submit'] = array('#type' => 'image_button', '#src' => base_path() . path_to_theme() . '/images/search-button.png');
The problem is path_to_theme(). API.D.O
One of posible solutions is using drupal_get_path($type, $name):
$form['actions']['submit'] = array('#type' => 'image_button', '#src' => drupal_get_path('theme', 'corporateclean') . '/images/search-button.png');
Comments
Comment #1
gtsopour commentedHello 5n00py,
thank you for this report.
5n00py, since you deal with CorporateClean subtheming, is it easy for you or anyone else who has free time to write a mini-documentation about CorporateClean subtheming. In this way we can help also other people about CorporateClean subtheming like
Thanks
/George
Comment #2
5n00py commentedAny progress?
Comment #3
alexandreracine commentedThis is mostly a support request, not a bug.
If I am wrong, change it back.
Comment #4
mstrelan commentedThis is a bug. Subthemes should work out of the box and not require workarounds. The approach in the OP is correct, simply replace path_to_theme() with drupal_get_path('theme', 'corporateclean'). The call to path_to_theme() is not safe in this instance. Same in corporateclean_preprocess_html().