I'm testing on a dev server, so the test site is not in webroot - which might be part of the issue - but... image URL's always fail to be found and displayed. The text and link display as expected and show on the correct page, but no images within the block show at all. They are entered correctly in admin as either an aliased path (via url alias w/ clean url's on, extended path alias, pathauto, and/or pathologic) or a known relative path, i.e., 'sites/default/files/...etc.'. Moving them to another directory doesn't help.
The rendered page displays the 'img src' as only the tail of the relative path to the image, with a leading slash... '/sites/default/files/banners/myBanner.jpg'.
Comments
Comment #1
coolestdude1 commentedWhen you goto the form what is the prefix for the imgurl path?
Comment #2
kenwen commentedI'm experiencing a similar problem - have a multisite setup
the url the banner is set up for is node/1
the banner url is sites/fitness.io/files/banners/parkour.jpg
the node it should appear at is http://www.fitness.io/node/1
thx,
Ken
Comment #3
organicHack commentedI've had the same issues. I've actually had to hack the template file (in the sites/all/modules/dynamic_banner/templates/ directory) and hard-code in the url temporarily to find it. The issue is that you set the save path in the configuration, but it does not print the same path to the browser. The "public://" text varible is misleading and if you begin to search around it is peculiar the paths that you get.
I think this would be a relatively easy fix.... at the moment it does disable the module completely.
Comment #4
SeriousMatters commentedI think the problem is the way this module handle file paths.
We should just use file_create_url() instead of dealing with public://.
Or even better, use theme_image() in the template instead.
Comment #5
froeser commentedHi, I have the same problem, again it doesn't find the image in a multisite setup.
Does anyone have a patch for that?
Sorry, I didn't recognize. This Issue is for Version 7.x-1.0
Comment #6
froeser commentedHi, here again under the correct version number.
Same issue, the banner doesn't show the correct immage urls in a multisite configuration.
Also I get following error where I don't know if that has to do with it.
Notice: Trying to get property of non-object in dynamic_banner_image_delete() (line 813 of /drupal/sites/mysubsite/modules/dynamic_banner/includes/callbacks.inc).Comment #7
HumanTex commented@froeser - The issue wasn't started under 7.x version code - resetting to it's original so it's not lost or treated as a non-issue for 6.x users.
As for the 'non-object' errors I've seen, most of them seem to be related to PHP version issues, where 5.3.x is used instead of 5.2.x or lower.
Comment #8
coolestdude1 commentedI have another project consuming all my time but I have queued up this task as I see it is picking up more people along the way. I will really try to fix this soon.
So if I got this correctly firstly there is a php legacy compatibility problem between 5.3 and 5.2 which I know the module has had that before using the strange string manip that it does. So I will try to find the offending code.
Then there is a multi site problem that spans both 6 and 7 versions. I was also seeing the non object error in 7 so they may have updated and I just haven't noticed.
There is a settings suggestion for using a theme or file_create_uri which I need to review thanks for that.
But that just about covers it. Right?
Comment #9
froeser commentedHi, sorry for this errors ;-)
Should I then open a new issue with the same problem for 7.x?
And thanks for the 'non-object' response. Mixed there two different issues into one.
Comment #10
coolestdude1 commentedWorks perfectly with that new method, awesome! Hopefully no more multi site problems? Please test this theory out for yourselves tomorrow when the dev version gets updated with the commit or just grab the repo from the public git. Note the template file had to change to allow for this difference in url pattern as a / was used to call internal files, and well that is not needed anymore.
Comment #11
HumanTex commentedMaybe I've missed something obvious on what new method works and what will be committed and released, but as I originally filed this as a 6.x issue (and obviously I'm not the only one affected), will there be a 6.x fix forthcoming? Moving to D7/8 is not an option for me.
Comment #12
coolestdude1 commentedSure Ill work on the back port for you bud. I realize where the problem is now so hopefully it wont take me long (cross fingers). Ill let you know.
Comment #13
abrlam commentedHere's a short term solution (tested on 7.x-1.0) until an offical patch is released by the original creator:
also in banner_output_template.tpl.php:
do a global search for '/$url' and replace with '$url' (remove the slash)
Comment #14
coolestdude1 commented