The attached patch removes the $base_url variable (it's not needed, since the <base> element in HTML takes care of that) and added drupal_get_path() in the place of the hard-coded module path.

CommentFileSizeAuthor
flickrstickr.multi-site.patch.txt838 bytessillygwailo

Comments

ee’s picture

Assigned: Unassigned » ee
Status: Active » Fixed

Thanks, you are right.

Ian Ward’s picture

This seems to break in 4.7 beta5. What's printed in the head in beta5 is "<script type="text/javascript" src="modules/flickrstickr/flickrstickr.js"></script> and compare this to <script type="text/javascript" src="/dev/trunk47/modules/tinymce/tinymce/jscripts/tiny_mce/tiny_mce_gzip.php"></script> which is from the webroot. You would think it would still work, but I think it has to do w/ base_path()

ee’s picture

And what about your

Could you send me an url about your installation? Could I test it?

Ian Ward’s picture

Marton, I just sent you that info. I am wondering if there is a larger problem with the base_path function, or maybe i do not understand it correctly. For example, it seems you can no longer call images with relative links in content, nor files for that matter. For example, in beta5, this will not work in a post <img src="themes/bluebeach/logo.png" /> Does it work here? test - Only local images are allowed.. Is Drupal.org not up to date w/ CVS? Then, if you're on a node, and you call an image from a relative path, it looks for it in a node folder like http://fullexampleurl.com/node/themes/bluebeach/logo.png So this makes me think the inability to call the module by drupal_get_path is related to base_path. I'll go do some looking.

ee’s picture

As I wrote your theme is perhaps wrong. The <base href="http://fullexampleurl.com/"> is absent. If you would like to use short url and relative path you must set it correctly (usually your theme sets it via $base_url setting).

It works well in my default drupal 7b5 installation. Please check that there is a
<?php print $head ?>
line in your drupal7b5/themes/pushbutton/page.tpl.php file.
where pushbutton is your active theme name

Ian Ward’s picture

I'm using the default bluemarine in core which is using phptemplate.engine, and there is a print $head in page.tpl, but this problem still persists. I posted here asking what the final move on base_path() means for themes: http://drupal.org/node/13148#comment-79861 as it did not seem clear.

Ian Ward’s picture

Marton, is your test site in the documentroot of apache, or is it in a subdirectory of the web root? I think if it is in the web root, you would not see this problem. I've checked now in pushbutton, chameleon, and bluemarine, and in none of these themes does the image show up nor flickrstickr work. They all use phptemplate, so i did not test on another theme engine.

ee’s picture

My sandbox installation is not in my webroot, but I have an idea:

Which non core modules did you install? Perhaps one of this overwrite the standard drupal head. For example I see some gmaps specific code in your html source.
Could you send me a list of this modules. Than I will try it with flickrstickr in my sandbox.

Anonymous’s picture

Status: Fixed » Closed (fixed)