The taxonomy.rules.inc provides the RulesTaxonomyEventHandler class, but is not registered in the rules.info file. In the next comment you can find a patch to fix class loading problems (e.g. during installation via Drush)

Comments

hctom’s picture

Status: Active » Needs review
StatusFileSize
new379 bytes

Here is the patch...

tr’s picture

Version: 7.x-2.7 » 7.x-2.x-dev
Status: Needs review » Needs work

Yeah, it's not just taxonomy.rules.inc - a quick look shows that there are several include files containing classes or interfaces that are not listed in the .info file with a files[] declaration. Likewise, there is at least one file that IS listed in the .info that doesn't exist - includes/rules.dispatcher.inc

The rules.info file needs to be reviewed, and changes made so that ALL classes and interfaces are declared here, and there are no declarations of include files that don't exist or don't contain classes or interfaces.

Reference https://www.drupal.org/docs/7/creating-custom-modules/writing-module-inf... for the proper use of the files[] declaration.

tr’s picture

Here are some of the unneeded files[] declarations, as reported by phpcs (see the automated tests tab on the project page):

rules_admin/rules_admin.info
5 It's only necessary to declare files[] if they declare a class or interface.
6 It's only necessary to declare files[] if they declare a class or interface.

rules_scheduler/rules_scheduler.info
6 It's only necessary to declare files[] if they declare a class or interface.
7 It's only necessary to declare files[] if they declare a class or interface.
8 It's only necessary to declare files[] if they declare a class or interface.
9 It's only necessary to declare files[] if they declare a class or interface.
12 It's only necessary to declare files[] if they declare a class or interface.
13 It's only necessary to declare files[] if they declare a class or interface.

tests/rules_test.info
6 It's only necessary to declare files[] if they declare a class or interface.

tr’s picture

Status: Needs work » Needs review
StatusFileSize
new2.52 KB

I think this covers everything. I'd like a review to ensure I didn't miss anything that should be there or include anything that shouldn't be there ...

  • TR committed 31d9e6d on 7.x-2.x
    Issue #2382927 by TR: taxonomy.rules.inc provides a class and has no...
tr’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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