Comments

internetdevels’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB

Only one theme() cal has been found.

star-szr’s picture

Since there is only one call I think we can take a cleaner approach, check how template_preprocess_page() does it:

  // Prepare render array for messages. drupal_get_messages() is called later,
  // when this variable is rendered in a theme function or template file.
  $variables['messages'] = array(
    '#theme' => 'status_messages',
    '#access' => $variables['show_messages'],
  );
star-szr’s picture

Status: Needs review » Needs work
chakrapani’s picture

Assigned: Unassigned » chakrapani

Working on this..

chakrapani’s picture

Assigned: chakrapani » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.2 KB

Here we go!

jessebeach’s picture

Status: Needs review » Reviewed & tested by the community

This is fine. Nearly the same code exists in template_preprocess_page for rendering status messages.

star-szr’s picture

Status: Reviewed & tested by the community » Needs work

Yeah this is fine but I think the drupal_render() is really unnecessary here. Just set $variables['messages'] the same way template_preprocess_page() does.

chakrapani’s picture

Status: Needs work » Needs review
StatusFileSize
new1.13 KB

Cottser, you are right, it does work without the drupal_render here.
Adding the new re-roll again.

star-szr’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @chakrapani!

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.