Any plan to port this drupal 7 since drupal is release beta soon

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

Category: feature » task
Status: Active » Needs review
FileSize
45.84 KB
21.32 KB

Here's a drupal 7 port. I think it works well. It contains a couple of bug fixes as well.

It's attached both as a patch against the latest D6 and also as a complete module.

Thanks for the excellent module. I always find it useful when clients have limited access to the filesystem.

BenK’s picture

Subscribing and will test out the patch in #1....

BenK’s picture

Status: Needs review » Reviewed & tested by the community

I gave #1 a pretty thorough testing, trying out the various configuration options in lots of different scenarios. Everything is working great and functions just as expected. Thanks rfay!

I think this D7 port is ready to be committed. I'd love to see the CSS Injector maintainers open an official 7.x-1.x-dev branch.

Cheers,
Ben

rfay’s picture

Status: Reviewed & tested by the community » Needs work

I'll have another round coming soon with some small fixups and with tests. I'd appreciate it if you'd have another look at that one, @benk. Thanks for your vote of confidence on this first round.

rfay’s picture

Status: Needs work » Needs review
FileSize
71.36 KB
30.58 KB

OK, this one should be ready to commit.

It includes a number of small fixes in addition to:

1. Nontrivial test suite that does many of the things that css_injector does.
2. It uses the new D7 facility hook_css_alter() to actually make this module's CSS take priority over even the theme's CSS.

Of course I may have messed something up, so testing is in order.

Attached as both a patch (against D6) and a module.

BenK’s picture

Status: Needs review » Needs work

I've been doing some testing of the patch in #5 and noticed the following warning message at the top of the page after saving a new CSS injector rule:

Warning: in_array(): Wrong datatype for second argument in drupal_write_record() (line 5981 of /home/sandboxes/drupal/includes/common.inc).

This warning message seems to only occur when saving a new rule... it doesn't appear when editing and saving and existing one.

Also, the new hook_css_alter() is working great. The module is successfully taking precedence over the theme CSS. This is a nice feature... I used to have to set the "Media" to "Screen" to work around this. Now I can leave it set to "All" and it is possible to override. Very cool!

--Ben

rfay’s picture

Status: Needs work » Needs review
FileSize
74.9 KB
30.58 KB

@BenK, Thanks very much for the excellent testing. Good catch!

Here's an update to fix the #fail.

Thanks,
-Randy

BenK’s picture

Status: Needs review » Needs work

@rfay: I've tested the patch in #7 and it's working great. The warning message is gone and everything is working smoothly.

The only feature this module is lacking, I think, is an option to disable/enable a specific rule. When you're testing CSS (a primary use case for this module), you really need to be able to turn CSS rules on and off. Currently, I work around this by setting a rule to appear on only one page I don't care about (when I want to disable it), but this necessitates changing the rule itself. It would be better to have a checkbox on the main settings page (admin/config/development/css_injector) to enable or disable a rule. Any interest in this?

Otherwise, this is RTBC.

Cheers,
Ben

rfay’s picture

Status: Needs work » Needs review

My intent was just to get this *ported*, not to add features. Once we have it ported and committed, it can have issues for additional features. Also, the tests should be backported to D6 at that point.

BenK’s picture

Status: Needs review » Reviewed & tested by the community

OK, sounds good. In that case, I'm marking this RTBC. Nice work on the port!

--Ben

eaton’s picture

Committed -- sorry for the delay, the recent beta has prompted me to dive back in and get things rolling. It's in the D7 dev branch and I'll be rolling an initial release shortly!

eaton’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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