I can see some aggregated css files that are empty.

Is this intentional?

Comments

mikeytown2’s picture

Generally no, it is not intentional. Can you look up in your database what files are included in that bundle?

Modify this query to see what files are included.

SELECT *
FROM advagg_bundles
INNER JOIN advagg_files USING (filename_md5)
WHERE bundle_md5 = '002577c74e8efb3ad7d40d37d52178c3'

Another thing that might be helpful is adding ?advagg-debug=1 to the end of the URL and attaching the watchdog debug output as a file in this issue. You need the "bypass advanced aggregation" permission for this to work.

Also see #1181928: Optimize output from css_emimage

mikeytown2’s picture

Status: Active » Closed (cannot reproduce)

Closing this issue as I've gotten no feed back on it.

killes@www.drop.org’s picture

Status: Closed (cannot reproduce) » Active

I've now been able to investigate this. This happens if the CSS file is itself empty. Maybe include a check for this?

I agree that the file should not be empty in the first place.

loopduplicate’s picture

Component: CSS Compression » Code
Issue summary: View changes

Drupal 7 query:

SELECT *
FROM advagg_aggregates
INNER JOIN advagg_files USING (filename_hash)
WHERE aggregate_filenames_hash like '%69NwfMA8WY0o2mDb_XW0m0hpVOJF5jtbst4DDY4Z8eY%'
Diane Bryan’s picture

A use-case for an empty css file: AdaptiveTheme includes media breakpoint css files, and requires that they always be left active, even if completely empty. Thus, the site builder can decide whether to have overlapping media queries or stacked queries. So, you don't want to have your advanced aggregation removing them, or you'll probably break the theme.

mikeytown2’s picture

Status: Active » Closed (works as designed)

No good fix for this.
Marking as closed (not fixed, reopen with patch).