I have set up a couple of rules and all was fine until I visited the update.php page. I got this series of messages:

Notice: Undefined index: group in drupal_sort_css_js() (line 2954 of /var/www/d7test/includes/common.inc).
Notice: Undefined index: group in drupal_sort_css_js() (line 2957 of /var/www/d7test/includes/common.inc).
Notice: Undefined index: every_page in drupal_sort_css_js() (line 2964 of /var/www/d7test/includes/common.inc).
Notice: Undefined index: every_page in drupal_sort_css_js() (line 2967 of /var/www/d7test/includes/common.inc).
...
[the 4 above errors repeating a few times in random order]
...
Warning: uasort(): Array was modified by the user comparison function in drupal_get_css() (line 2912 of /var/www/d7test/includes/common.inc).
Notice: Undefined index: type in drupal_get_css() (line 2917 of /var/www/d7test/includes/common.inc).
Notice: Undefined index: type in drupal_get_css() (line 2917 of /var/www/d7test/includes/common.inc).
Warning: ksort() expects parameter 1 to be array, null given in drupal_group_css() (line 3030 of /var/www/d7test/includes/common.inc).
Notice: Undefined index: type in drupal_group_css() (line 3042 of /var/www/d7test/includes/common.inc).
Warning: ksort() expects parameter 1 to be array, null given in drupal_group_css() (line 3030 of /var/www/d7test/includes/common.inc).
Notice: Undefined index: type in drupal_group_css() (line 3042 of /var/www/d7test/includes/common.inc).
Notice: Undefined index: data in drupal_pre_render_styles() (line 3260 of /var/www/d7test/includes/common.inc).
Notice: Undefined index: data in drupal_pre_render_styles() (line 3260 of /var/www/d7test/includes/common.inc).

Comments

rfay’s picture

There haven't been any new commits to css_injector. However, there have been some changes to Drupal's CSS handling in the last few weeks.

Why do you think this has to do with css_injector?

Can you say what updates ran? That would help a lot.

klonos’s picture

Why do you think this has to do with css_injector?

Well...

- it clearly has to do with css and css_injector is the only css related module I have enabled.
- it only happens in update.php and I have not seen the issue while testing #1003204: PDOException SQLSTATE[23000] 1062 Duplicate entry, field_revision_title_field, line 2762 ../includes/database/database.inc. I must have visited the test site's update.php say around 10 times during the last day - never had the issue.
- I used update.php quite a few more times during the last say 10-15 days period while updating latest dev versions of views3 requiring db updates - never had the issue.
- I've been using this test d7 setup since like months now and I never saw these errors till after installing css_injector (it was the last module I installed - yesterday).
- I thought it might be core too, but search in its issue queue returned only results that seem to not be relevant to my issue.
- disabling the module makes the messages go away - re-enabling it brings them back.

Can you say what updates ran?

The errors showed up before ay updates were run (2nd step, at the page where you see what updates are pending - before even hitting the 'Apply pending updates' button).

rfay’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

OK, I think this should fix the problem.

Thanks for the bug report!

klonos’s picture

Status: Needs review » Reviewed & tested by the community

...this should fix the problem.

Yep, it does! Thanx for the prompt solution Randy ;)

eaton’s picture

Status: Reviewed & tested by the community » Fixed

Whoops. This patch snuck into the last commit. Also, it works. So. Committed! ;-)

klonos’s picture

Thanx Jeff!

Status: Fixed » Closed (fixed)

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

karilu_ec’s picture

Status: Closed (fixed) » Active
StatusFileSize
new259.82 KB

I have encountered this same error after updating to Drupal 7.2 and trying to run the update.php. I am currently using CSS Injector 7.x.1.4. After disabling CSS Injector, update.php runs without notices and warnings. However, when re-enabling CSS injector and running update.php the notices and warnings are back. That is the version where it got fixed right? I have attached an image with the errors.

rfay’s picture

Status: Active » Fixed

Sorry, no - it was only fixed in 7.x-1.x-dev. Somebody forgot to do a release.

I just released 7.x-1.5, which does contain this. Could you please test and make sure it works for you?

klonos’s picture

Version: 7.x-1.4 » 7.x-1.x-dev

...changed to dev so we don't go chasing versions.

karilu_ec’s picture

I updated to version 7.x-1.5 and it does fix the problem. I can run update.php now with no problems.
Thank you

Status: Fixed » Closed (fixed)

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

likewhoa’s picture

Status: Closed (fixed) » Active

I just recently setup a D7 site using 7.x and have encounter this issue.

Notice: Undefined index: group in drupal_sort_css_js() (line 3037 of includes/common.inc).
Notice: Undefined index: group in drupal_sort_css_js() (line 3037 of includes/common.inc).
Notice: Undefined index: group in drupal_sort_css_js() (line 3040 of includes/common.inc).
Notice: Undefined index: group in drupal_sort_css_js() (line 3037 of includes/common.inc).
Warning: uasort(): Array was modified by the user comparison function in drupal_get_css() (line 2971 of includes/common.inc).
Notice: Undefined index: type in drupal_get_css() (line 2988 of includes/common.inc).
Warning: ksort() expects parameter 1 to be array, null given in drupal_group_css() (line 3114 of includes/common.inc).
Notice: Undefined index: type in drupal_group_css() (line 3126 of includes/common.inc).
Notice: Undefined variable: group_keys in drupal_group_css() (line 3146 of includes/common.inc).
Notice: Undefined index: type in drupal_aggregate_css() (line 3187 of includes/common.inc).
Notice: Undefined index: type in drupal_pre_render_styles() (line 3307 of includes/common.inc).
Notice: Undefined index: group in drupal_sort_css_js() (line 3037 of includes/common.inc).
Notice: Undefined index: group in drupal_sort_css_js() (line 3037 of includes/common.inc).
Notice: Undefined index: group in drupal_sort_css_js() (line 3040 of includes/common.inc).
Notice: Undefined index: group in drupal_sort_css_js() (line 3037 of includes/common.inc).
Warning: uasort(): Array was modified by the user comparison function in drupal_get_css() (line 2971 of includes/common.inc).
Notice: Undefined index: type in drupal_get_css() (line 2988 of includes/common.inc).
Warning: ksort() expects parameter 1 to be array, null given in drupal_group_css() (line 3114 of includes/common.inc).
Notice: Undefined index: type in drupal_group_css() (line 3126 of includes/common.inc).
Notice: Undefined variable: group_keys in drupal_group_css() (line 3146 of includes/common.inc).
Notice: Undefined index: type in drupal_aggregate_css() (line 3187 of includes/common.inc).
Notice: Undefined index: type in drupal_pre_render_styles() (line 3307 of includes/common.inc).

not sure if this should be a new issue but seeing that warnings and notices are similar, I figure I reopen this issue again.

likewhoa’s picture

Status: Active » Fixed

actually this should be reported for core.

Status: Fixed » Closed (fixed)

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