I am experiencing multiple extra new lines between the last link tag and the conditional styles (see attached image). Has anyone else seen this behavior?

I removed any custom code that I believe could have been affecting this and did not see a difference. I was able to remove 2 new lines from the module to fix my output, but unless others have this problem there is no need go any further... :)

Brian

CommentFileSizeAuthor
#3 advagg-1267870-2.patch764 bytesmikeytown2
advagg_extra_spaces.png10.48 KBnairb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

I can see in the code how this is happening.

function advagg_processor(&$variables) {
...
    // Build HTML code.
    $processed_css = advagg_process_css($css);
    if (!empty($processed_css)) {
      $variables['styles'] = $processed_css;
    }
    $variables['styles'] .= "\n". $css_conditional_styles;
...
}

function advagg_unlimited_css_traditional($files, &$styles) {
...
      else {
        $styles .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. $href . '" />' . "\n";
      }
...
  $styles .= $last_suffix . "\n";
}

I got an idea on how to clean this up.

mikeytown2’s picture

Status: Active » Fixed

committed this patch, let me know if this doesn't solve the issue for you.

mikeytown2’s picture

FileSize
764 bytes

Status: Fixed » Closed (fixed)

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