I get two of these messages when js aggregation is enabled:
Warning: file_get_contents(/misc/jquery.form.js): failed to open stream: No such file or directory in drupal_build_js_cache() (line 4751 of /home/liam/Sites/earthrace/includes/common.inc).
Warning: file_get_contents(/misc/ajax.js): failed to open stream: No such file or directory in drupal_build_js_cache() (line 4751 of /home/liam/Sites/earthrace/includes/common.inc).

Looks like this is from devel_themer.module in devel_themer_init()

$base_path = base_path();
drupal_add_js($base_path . 'misc/jquery.form.js');
drupal_add_js($base_path . 'misc/ajax.js');

The final path shouldn't have a preceding slash

Notice: Undefined index: preprocess functions in devel_themer_theme_twin() (line 513 of /home/liam/Sites/earthrace/sites/all/modules/devel_themer/devel_themer.module).

Comments

Liam Mitchell’s picture

That last line isn't related. Another error I noticed but not fatal.

JeremyFrench’s picture

I'll look into this some more, but it is worth mentioning that aggregation is a performance measure. Devel_themer, and I would also say devel are performance hogs used for development and should not be turned on, on production or test environments.

Personally I would say that devel_themer should turn it self off if aggregation is turned on. I can't see a case where you would want both to run concurrently.

Liam Mitchell’s picture

Yeah, I know what you mean but its a simple change and would prevent much hair pulling if someone encountered the same problem.

Its only those two files that are added as absolute paths when it looks like all other uses of drupal_add_js pass relative paths.

See http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad...

" 'file': Path to the file relative to base_path()." - It requires relative path so doesn't need base path added.

tebb’s picture

Seeing the same warnings under probably the same circumstances.

Are you saying that replacing the three lines with these two ...

drupal_add_js('misc/jquery.form.js');
drupal_add_js('misc/ajax.js');

... will remove the warnings?

Liam Mitchell’s picture

Yes, they shouldn't have base path added to them.

lightstring’s picture

Confirming that.

droplet’s picture

Status: Active » Needs review
StatusFileSize
new606 bytes

i have same issue

brightbold’s picture

Thanks for the patch. That eliminated the errors for me (although I'm still not seeing the Themer checkbox in the lower left corner, but I'm assuming that's a different problem.)

dashohoxha’s picture

I can confirm this too. Removing the $base_path removed the warning.

tigron’s picture

I second that the warning is removed with the patch but I don't see the Themer controls/checkbox. Am I missing something ?

khiminrm’s picture

Have the same as is in #10

cluther’s picture

subscribe. Also experiencing the errors and the missing Themer control/checkbox in D7.

effulgentsia’s picture

Status: Needs review » Fixed
StatusFileSize
new2.27 KB

Thanks. #7's a step in the right direction. This patch builds on that. Committed it to master branch.

Status: Fixed » Closed (fixed)

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