This seems to be similar with #462586: Language code in url but I am positive that I have the module and therefore the icon at the right place. I don't get the icon only the text ( and when I chose icon_text option I get the "Post to Twitter Post to Twitter"). If I browse to localhost/D6/sites/all/modules/tweet/icon.png I see the icon.
The watchdog shows me a page not found error like:
Location http://localhost/D6/D6/sites/all/modules/tweet/icon.png
Referrer http://localhost/D6/de/bb/location/orte/%5Bcat-raw%5D/2009/5/ff
Message D6/sites/all/modules/tweet/icon.png
Severity warning
It seems that somehow a second D6 gets into the page request but I don't know why. Is it a mistake on my side or in fact a bug?
I am testing your great module on my local XAMP installation.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | tweet_icon_16.png | 1.08 KB | doublejosh |
Comments
Comment #1
icecreamyou commentedOkay, I'm going to need you to do some testing for me similar to what I asked in the thread that you linked to. Please paste this PHP code in a node/add page and click preview, and copy-paste your results back here.
Comment #2
dddave commented$base_url: http://localhost/D6
$base_path: /D6/
$base_root: http://localhost
base_path(): /D6/
request_uri(): /D6/de/node/170/edit
$_SERVER["SERVER_NAME"]: localhost
$_SERVER["REQUEST_URI"]: /D6/de/node/170/edit
$_GET["q"]: node/170/edit
url(): http://localhost/D6/de/node/170/edit
http://localhost/D6/D6//sites/all/modules/tweet/icon.png
If you want me to apply some variations I could need some words of explanation because I am a total virgin to this coding black magic. I am very willing to try and learn but it could take some extra steps. ;-)
Comment #3
icecreamyou commentedActually--try this:
Comment #4
dddave commentedShould I use only this snippet? If I use only this I get an empty display.
edit: please wait- I think I see my mistake
edit2: Still no results. Mistake on my side?
edit3: Both snippets together bring this:
$base_url: http://localhost/D6
$base_path: /D6/
$base_root: http://localhost
base_path(): /D6/
request_uri(): /D6/de/node/add/bb-eintrag
$_SERVER["SERVER_NAME"]: localhost
$_SERVER["REQUEST_URI"]: /D6/de/node/add/bb-eintrag
$_GET["q"]: node/add/bb-eintrag
url(): http://localhost/D6/de/node/add/bb-eintrag
http://localhost/D6/D6//sites/all/modules/tweet/icon.png
Comment #5
icecreamyou commentedUm. That's weird. It might be something screwy with your installation then.
What do you get when you run this?
Comment #6
dddave commentedThis generates: /sites/all/modules/tweet/icon.png
I am going to check this on site located on an live server and see if the problem persists. Perhaps this is in fact something with my local install. Hope I can get this done today.
Comment #7
icecreamyou commentedReally, that's it? You should have gotten a result like this:
...if that's what you got and you were just simplifying that result, that's fine. If this is the case, what you got is the expected result, and either the image is not in the expected location (which you can change in the settings) or something is wrong with your local installation, or there is a bug in Drupal core. I suggest you navigate to http://localhost/D6/sites/all/modules/tweet/icon.png and make sure the icon is there.
In either case, the code that's in the module currently is not technically "correct" because it doesn't use the core function, so that will be changed.
Comment #8
icecreamyou commentedI've committed the theme('image') change to dev. I'm 98% sure that if it doesn't work after that, it's not a bug in the module: you might not be pointed to the right directory, or your installation is screwy, or there's a bug in core, or there's a bug in your theme.
Good luck, and do let me know if there are any developments.
Comment #9
dddave commentedSorry for the standstill on my side but I didn't have had the time to check this. I am going to check out the .dev and report back however it might take me some days before I can go back on this.
@#7 As stated in my initial post the icon is correctly located - I can browse to it. I didn't shorten the message but I don't think there is currently more need to work on this as long as I cannot provide more valuable testing on my side.
Nevertheless thanks for the support and this cool module! I'll report back.
Comment #10
icecreamyou commentedOkay, cool, no problem. Your testing has actually been unusually responsive and quite useful, so thanks for that.
Comment #11
dddave commentedHi,
I've checked the dev on my local install and still no good. If icon is chosen nothing is shown. However we might be save to point this to my install and not a general issue, because:
On my live server the dev works as advertised. Thanks again for this cool and easy to use module!
Comment #12
icecreamyou commentedAt this point it's a core/theme and not a module issue. I'm glad it works on your live server, and of course feel free to open another issue if anything else goes wrong.
Comment #14
2noame commentedInteresting, I have the exact same issue on my production site. Looks like you didn't find an actual fix for it though. I'm guessing perhaps there is a conflict going on with another module? Because there certainly isn't anything "screwy" with my install. It's a production environment with everything working.
Comment #15
2noame commentedSwitched to the dev version and this problem is now fixed.
Comment #16
doublejosh commentedThe problem arises when you have an installation that is NOT at the root level. That happened at my site which uses: http://mysite.com/beta
All you have to do is change
. $base_url . base_path() .tobase_path()The
base_path()function is enough.Also, here is a cute little tweet icon to use.
Comment #17
icecreamyou commentedThe module doesn't use that code any more. It now uses a Drupal core theming function that takes care of all that.
Comment #18
mattman commentedDespite this issue being closed, others might find this solution useful.
PROBLEM: The image was not rendering and was instead showing as img tag HTML code. Here's more details.
Having just spent a few hours trying to track down an issue (should have just used a debugger) where the icon would not display and all I got was HTML code of the img tag, it turned out I was using a theme which was an older theme that had used a theme override within it.
The theme I am currently using on GotDrupal.com is amadou
This theme (which has not been updated in a while) has a phptemplate_links override for the theme_links function. This is one of the hazards of using a theme override in template.php and updating drupal core, but not your theme. Drupal had changed theme_links but this is not up-to-date in amadou (which looks like it was a precursor to the updates in drupal's theme.inc)
If an override is provided within the theme you're using, and you download a module like Tweet and you can't figure out why it might not be working, it could be a theme function override problem. You can see the problem file for amadou here
http://drupalcode.org/viewvc/drupal/contributions/themes/amadou/template...
This may be an extreme edge case, but it's a good troubleshooting tip.
SOLUTION: When you're not getting the display expected, test against a core (unaltered theme) and check your template.php file in your theme for a conflicting theme override function. It will save you the headache. For me, I'll be taking some aspirin (just glad I figured it out)