Cause it implements a drush_exit hook and calls trace analytic functions that don't exist cause module code not added.

Comments

hefox’s picture

Status: Active » Needs review
StatusFileSize
new608 bytes
hefox’s picture

StatusFileSize
new542 bytes

wrong path

shivar’s picture

Status: Needs review » Active

The patch works for me. The only change I made was replace the first line with:
diff --git a/sites/all/modules/traceview/traceview.drush.inc b/sites/all/modules/traceview/traceview.drush.inc

Thanks!

hefox’s picture

Status: Active » Needs review

Why did you change issue status to "Active"? If patch needs work, "needs work", but as far as I can tell this doesn't need work -- the patch from comment 2 has the correct patch from module root.

blazindrop’s picture

StatusFileSize
new845 bytes

I am experiencing a similar error, but not for this function. Since traceview_set_partition() is wrapped with a condition on the variable traceview_partition_drush_traffic existing, I wonder if you have this variable set to a non-false value even though your module is off.

In my case I don't have any traceview variables and the error I get is:

Error: Call to undefined function traceview_set_attributes() in /mnt/www/html/advmediastg/docroot/sites/all/modules/contrib/traceview/traceview.drush.inc, line 28

The code for this function call doesn't have any conditions around it so it will run regardless if the module is enabled or not. The big question is, when is it appropriate to call traceview_set_attributes()? Attached is my patch. This was tested locally. One reason I'm not using module_enabled() for the condition is performance.

Eronarn’s picture

A better solution for this would be to move the partitioning/controller/reporting functions out of traceview.module and into traceview.inc so that they can also be included during a Drush run. After all, you still want to report a partition for those drush requests!

Eronarn’s picture

Status: Needs review » Needs work
pdrake’s picture

Assigned: Unassigned » pdrake
Status: Needs work » Active
pdrake’s picture

Status: Active » Fixed

  • Commit e8e65dc on 7.x-1.x by pdrake:
    Issue #2233679: Move utility functions into traceview.inc for inclusion...

  • Commit e8e65dc on 7.x-1.x by pdrake:
    Issue #2233679: Move utility functions into traceview.inc for inclusion...

Status: Fixed » Closed (fixed)

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