I have Imagex installed on a multisite/multilingual site (actually, installed on both sites in the multisite setup, both of them multilingual using the i18n module, path prefix with language fallback). On one of the sites, the path to the postlet.jar file includes the language prefix in the default and secondary language, and is broken as a result. On the second site, the applet seems to fail when viewing the site in the secondary language. Any chance I'm just missing a setting somewhere, or that others have had the same problem? Prior to installing I had different multilingual settings when settings up the sites but settled on the same settings for each site. I'm not immediately seeing differences between the sites that seem to be causing the difference (unless its related to the multisite set up, where the one site Imagex is working on is the site I first installed the module on). Either way, it seems the path to the postlet.jar file should ignore language path prefixes.
All modules are current as of April 14, 2010.
Comments
Comment #1
rvallejo commentedSo, looking a little bit more, it seems its just drupal_get_path including the prefix. I'm assuming there is a way to strip the language prefix but didn't find it right away, and simply setting the base_url in settings.php didn't do the trick. I'm using this on a pretty small site that I'm doing for free, so its not a big deal for me to spend a lot of time and energy figuring this out, but I figure its something the maintainers might want to fix. For now, I'm just hard-coding the path as /sites/all/modules/imagex/...
EDIT:
Actually, I just changed the archive path from
to
This is working for me. Is the url/absolute path necessary? This seems to be how module_load_install works.
Comment #2
sdrycroft commentedIndeed, thanks for this rvallejo. This is something I'm aware of, and thought I'd fixed. The code should be changed from:
<applet name="postlet" code="Main.class" archive="'.url(drupal_get_path('module','imagex').'/postlet/postlet.jar', array('absolute' => TRUE)).'" width="100%" height="300" mayscript>to:
<applet name="postlet" code="Main.class" archive="'.base_path().drupal_get_path('module','imagex').'/postlet/postlet.jar" width="100%" height="300" mayscript>