Hello,

I test your module and the path return is false, the url is encoded :

<script src="http://mysite.localhost/sites%5Cdefault%5Cfiles%5Cjs_injector%5Cjs_injector_1.js?ltq5k0" type="text/javascript"></script>

How to correct it?

Thanks for this module

Comments

barwonhack’s picture

bump-sub ... er, uhm, "thing"

hadi farnoud’s picture

Priority: Normal » Major
eduardocintas’s picture

Status: Active » Needs review

Seems to be a windows only problem puting this on line 52 fix the issue:
$filepath = str_replace('\\','/',$filepath );

Lex’s picture

@eduardocintas:
Thanks, but in which file should I put this line?

barwonhack’s picture

Not windows only. I use Debian / Nginx

mwsam’s picture

I also encounter this problem on a windows server, I do the same thing as @eduardocintas to solve it.

@Lex: It is in js_injector.module

davidd07’s picture

Also confirming this is not only windows problem, #3 addresses this issue.

wiifm’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hey all,

Can you try upgrading to the 7.x-2.x version of this module (note, there is no upgrade path), and see if this issue persists?

Sean

apmsooner’s picture

I'm on latest version of 7.2 and i get this error:
File temporary://fileT4KOa4 could not be copied, because the destination directory public://js_injector is not configured correctly.

apmsooner’s picture

I just manually created the directory js_injector and gave public write permissions and i'm good now.

wiifm’s picture

@apmsooner there is now hook_requirements() in the 7.x-2.x version of the module, so if the webserver cannot create or write to the folder "public://js_injector" your statue report will be red (unhappy). Yes, you are right, granting the webserver permissions to either:

  • create the folder itself or
  • creating the folder by hand, and then granting correct permissions

will resolve the issue.

vinmassaro’s picture

@wiifm: what if you can do neither from #11? Shouldn't the module be doing this correctly?

theoc’s picture

weirdly, I created js_injector in sites/all/modules/js_injector and gave it 777 permissions. Then, my problems were gone, too. But after I deleted sites/all/modules/js_injector/js_injector (out of curiosity) my problems still are gone.

astonvictor’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks