js files not found if module is anywhere but /modules

ericG - December 24, 2006 - 23:48
Project:Subform
Version:4.7.x-0.30
Component:Code
Category:bug report
Priority:normal
Assigned:ericG
Status:active
Description

if you put the module in sites/default/modules or sites/sitename/modules the .js files are not found and therefor the module will never insert data into the database

#1

ericG - December 25, 2006 - 00:34
Assigned to:Anonymous» ericG

I'll submit a patch for this tomorrow, but the fix is to change

in subform.module

drupal_add_js('modules/subform/subform.js');
to
$path = drupal_get_path('module', 'subform');
drupal_add_js($path . '/subform.js');

and in persistent_fieldset.module
drupal_add_js('modules/subform/persistent_fieldset.js');

to

$path = drupal_get_path('module', 'subform');
drupal_add_js($path .'/persistent_fieldset.js');

#2

MrTaco - December 25, 2006 - 15:00

very cool, thanks for finding/fixing this issue eric

i'd like to give you commit access on this project, and just allow you to fix this and anything else you feel like working on

if you're interested, just know that I keep the most current revision in a subversion repository at google code, and I just sync up the drupal cvs when i'm ready to release (75% of subform traffic is generated by this module listing, so i definetly like being listed here, i just to like cvs)

lemme know if ur interested

#3

ericG - December 27, 2006 - 19:42

sure. I'd be glad to help on that level. Thanks for the offer. I'll be busy this week, but next week I'll start assigning other bugs and requests to myself and working on patches.

#4

jpsalter - March 6, 2007 - 17:45

Note: in subform.module -> there are three locations in the code that need the change

 
 

Drupal is a registered trademark of Dries Buytaert.