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

gtsopour’s picture

Assigned: Unassigned » gtsopour

Hello 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

5n00py’s picture

Any progress?

alexandreracine’s picture

Category: bug » support

This is mostly a support request, not a bug.

If I am wrong, change it back.

mstrelan’s picture

Category: Support request » Bug report
Issue summary: View changes

This 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().