- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Reviewing as part of Bug Smash Initiative. As per the comment in #25 marking this as PMNMI.
I never used Drupal on windows before but now I just wanted to test my module on clean drupal and found out that I just cant use
drupal_add_js(MY_MODULE_ROOT_REL. '\\js\\somejs.js');
// or
drupal_add_js(MY_MODULE_ROOT_REL. '/js/somejs.js');
I defined my custom constants as
/**
* Define root constant. (An absolute path: /home/var/www/)
* This is used to prevent using drupal_get_path() cause __DIR__ is much faster and
* don't use database connection to find out there this module is located.
* @note requires PHP 5.3+
*/
define('MY_MODULE_ROOT', __DIR__);
/**
* Relative path to this module (sites/default/....)
*/
define('MY_MODULE_ROOT_REL', str_replace(DRUPAL_ROOT. DIRECTORY_SEPARATOR, '', MY_MODULE_ROOT));
Disclaimer:
I know that Windows is not platform for develop but I think it is not good if Drupal won't work on windows too.
I know about drupal_get_path() but I don't want to use database connection just to find out the path to my module (I use drupal bootstrap_database layer and only include constant.inc files)
Postponed: needs info
11.0 π₯
file system
Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Reviewing as part of Bug Smash Initiative. As per the comment in #25 marking this as PMNMI.