In some case you don't want to put libraries into sites/all but for example in an installation profile (profiles/myprofile/libraries), and then ace_editor module can't find the lib.

I think it should be better to make a dependecy of libraries module and use http://drupalcontrib.org/api/drupal/contributions!libraries!libraries.mo...

So if you make libraries module as a dependency:

$ace_lib_path = libraries_get_path('ace');
// & replace all instances of
'sites/all/libraries/ace/src/'
// with
$ace_lib_path.'/src/'

or if you don't want the dependency with libraries module just make a control through https://api.drupal.org/api/drupal/includes!module.inc/function/module_ex...

I will create a patch if find some time tonight :)

Comments

Growiel’s picture

Hi,

I already knew this but could not find the time to fix it.

Did you manage to create a patch ?

Thanks!

alex.bukach’s picture

Status: Active » Needs review
StatusFileSize
new2.79 KB

Here's the patch. I believe a dependency on Libraries API for a module using a third-party library is a normal practice.

gurvan’s picture

Sorry I did not find some time to create the patch, thx to Alex for his work. I look the code & it looks good at the first sight :)

alex.bukach’s picture

At least it works for me now :)

Growiel’s picture

Hey guys,

As said in #2379381: Looking for a new maintainer, I am looking for a new maintainer, is one of you interrested ?

If not, can you please test it, @gurvan ? I can access git but at the moment I can't run a Drupal installation to test it out myself.

interdruper’s picture

Status: Needs review » Reviewed & tested by the community

Patch #2 works fine for me.

Collaterally, the patch also fixes #2066945: No such file or directory in _locale_parse_js_file()

interdruper’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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