On a pasted snippet the third script tag was generated by context_addassets module. You see, the src attibute is filled with the absolute unix path.

<script type="text/javascript" src="http://3w-site.maus/misc/jquery.cookie.js?v=1.0"></script>
<script type="text/javascript" src="http://3w-site.maus/sites/all/modules/panels/js/panels.js?lp1laz"></script>

<script type="text/javascript" src="/home/maus/www/3w-site.ru/sites/all/libraries/assets/ahahify.js?lp1laz"></script>

Comments

akamaus’s picture

Status: Active » Needs review
StatusFileSize
new696 bytes

I'm not sure, whether is it a correct fix, especially for multi-site configurations, but it works for me.

philipz’s picture

I tried that in multisite environment.
First I cleared and set up Assets configuration. Then I removed assets reactions from my context. Finally just to be sure I cleared cache... and it worked. Thanks!

clint.beacock’s picture

Thanks for this great module. If this gets fixed, it will definitely become my preferred method for managing assets.

I can confirm the problem, and that this patch has worked for me. Please consider committing it.

progzy’s picture

Works for me too (single website).

Actually the above patch fixes 2 issues:
- regex delimiter warning issue : http://drupal.org/node/1335430 (beta 1 version but apply to dev version too)
- current issue

Could you consider commiting then release beta 2 please?

zabelc’s picture

Title: "JS from filepath" reaction adds a script tag with an incorrect src attribute » "JS from filepath" & "CSS from filepath" reaction adds incorrect src attribute
Status: Needs review » Reviewed & tested by the community

I had the exact same issue with CSS imports (so I updated the title to include that).

@import url("http://mysite.org/sites/all/themes/omega/omega/alpha/css/alpha-debug.css?m3x55e");
@import url("/home/mysite/public_html/sites/all/themes/omega/pmc_theme/css/contexts/homepage.css?m3x55e");
@import url("http://mysite.org/sites/all/themes/omega/pmc_theme/css/global.css?m3x55e");

This patch accurately fixed it in a single site install. Thanks for the great work akamaus!

Note though, as philipz says, after you apply the patch you must:

  1. Remove your previous index path assets variable
  2. Delete all the "Add assets from filepath" Context reactions
  3. Re-add your index path assets variable
  4. Re-create your "Add assets from filepath" Context reactions
  5. Clear your caches (twice to be safe)

I skipped a couple steps above, and so I thought the patch didn't work for me (oops).

With all that said, I think this patch is ready for committing. With it, this module is going to be a great help at cleaning up my site styles!

ryanwebpage’s picture

Thanks for the patch akamaus, I will apply it as soon as I get a chance. Does anyone want to join the project and be a co-maintainer? Spare time has been extremely hard to find and there are a couple things on the roadmap that would be nice to implement.

nor4a’s picture

The #1 solved my issue! Thanks!
As far as I remember - in the dev version - everything was fine

lazysoundsystem’s picture

Patch in #1 solves the issue for file paths only - for assets in modules, see patch #3 in #1393184: Mask for the modules file search - and patch offered. And thanks @zabelc for the steps in #5 - that other patch only worked when I followed those.

chrisjlee’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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