First of all: thank you for your work ;-)

Here is my problem.

  • I installed and activated the module.
  • In 'admin/settings/logotool' I set
    • Path to your logos folder: modules/logotool/logos
    • Display mode: Random logos
  • In 'admin/settings/logotool/logos' I can see all the images I uploaded in 'modules/logotool/logos'
  • In the theme configuration
    • I unchecked 'Use the default logo'
    • Path to custom logo: logotool/logo

But in the source of any pages I find

<div class="logo"><a href="/sito/" title="Home"><img src="/sito/logotool/logo" alt="Home" /></a></div>

=> no images but the text-link to the home page

Thank you again for your work and for the attention.
With respect,
Danilo

Comments

Andy Ramblings’s picture

Good morning,

Ok, the best location for logo tool is in the /files folder as it's publicly accessible.
That's where I have it at the moment.
So you would have something like this:
/files/logos/
Make sure the permissions are set to 0777

Hope this helps,

pobster’s picture

The logos don't need to be in a public folder as they're 'served' up via the webserver.

My guess is that you've enabled caching even though it tells you everywhere that caching is incompatible with logotool? The puzzling thing is that the settings screen which shows every logo works right? Well, this isn't a cached page like normal nodes hence my guess... More information please. Mind you, my dev PC is fried so I'm probably not going to be an awful lot of help at the moment.

Pobster

saxon’s picture

No, caching is disabled.
It seems it does not look for names. "Somewhere" in the process it loose the path.
<img src="/sito/logotool/logo" alt="Home" /> does not exist.
I actually put images in /sito/modules/logotool/logos.
How could I get more information to give you?
Thank you to be patient,
Danilo

pobster’s picture

The path is correct, as I said before the image is served - not 'pointed at', indeed my own site shows;

<a href="/" title="Home"><img src="/logotool/logo" alt="Home" /></a>

Tell me more about how you're set up? Is your Drupal installation in a root folder or a folder within your root folder? I'm interested in why your image path has "/sito/" at the front of it? As a workaround until I can determine what you're doing wrong (!) change this line;

/**
 * Implementation of hook_menu
 */
function logotool_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array('path' => 'logotool/logo',                    // Change to;  $items[] = array('path' => 'sito/logotool/logo', 
      'callback' => 'logotool_logo',
      'access' => TRUE,
      'type' => MENU_CALLBACK
    );
    $items[] = array('title' => 'logotool info',
      'path' => 'admin/settings/logotool/logos',
      'callback' => 'logotool_logos',
      'access' => user_access('administer logotool'),
      'type' => MENU_NORMAL_ITEM
    );
  }
  return $items;
} // logotool_menu

Pobster

saxon’s picture

'sito' is a subdirectory in the public_html
Here is the site: www.mariomarzi.net (a friend of mine)
I changed the path as you suggest, but I always get the ALT(text) component of the href.
In 'admin/settings/logotool/logos' I always can see the images.

Question:
I install the i18n multilingual module. May this be the reason ?

Thank you again,
Danilo

pobster’s picture

Hmmm nope I think your problem stems from you using Drupal in a subfolder... Well I think so at least... Are you *sure* the 'sito' comes from it being inside a subfolder and not from the i18n module? I'm wondering whether the problem is because I'm not appending a base_path() to the logotool/logo menu entry...?

Pobster

saxon’s picture

Yes, absolutely sure.
The i18n module only adds the 'it/', 'en/'... to nodes
( for ex. http://www.mariomarzi.net/sito/?q=it/node/17 )

pobster’s picture

Okay, important question! With the module enabled (as it doesn't appear to be at the moment) what address do you type in to view a logo? You can check this by viewing the source on the logotool/logos page. Is it referring to: /logotool/logo?logo...? Or is it /sito/logotool/logo...?

Pobster

saxon’s picture

The module IS enabled.
You can see the ALT-text of the logo in the top-right corner ( 'Pagina iniziale' = Home page)

Images are in '/sito/modules/logotool/logos' and in logotool/logos I can see

############################
#
A list of all the logos in your logo folder showing which pages they're displayed on:
Filename Path Logo
01.jpg
02.jpg
03.jpg
04.jpg
05.jpg
06.jpg
07.jpg
08.jpg
09.jpg
10.jpg
11.jpg
#
############################

Danilo

pobster’s picture

Ah I meant could you paste the html from 'view source' when you right click on the logotool/logos page - the bit I'm after (cos I don't need all of it) will look like this:

 <tr class="odd"><td>gif1.gif</td><td></td><td align="center"><img src="/logotool/logo?logo=gif1.gif"></td> </tr>

 <tr class="even"><td>gif10.gif</td><td></td><td align="center"><img src="/logotool/logo?logo=gif10.gif"></td> </tr>
 <tr class="odd"><td>gif11.gif</td><td></td><td align="center"><img src="/logotool/logo?logo=gif11.gif"></td> </tr>
 <tr class="even"><td>gif12.gif</td><td></td><td align="center"><img src="/logotool/logo?logo=gif12.gif"></td> </tr>
 <tr class="odd"><td>gif13.gif</td><td></td><td align="center"><img src="/logotool/logo?logo=gif13.gif"></td> </tr>
 <tr class="even"><td>gif14.gif</td><td></td><td align="center"><img src="/logotool/logo?logo=gif14.gif"></td> </tr>

 <tr class="odd"><td>gif15.gif</td><td></td><td align="center"><img src="/logotool/logo?logo=gif15.gif"></td> </tr>
 <tr class="even"><td>gif16.gif</td><td></td><td align="center"><img src="/logotool/logo?logo=gif16.gif"></td> </tr>
 <tr class="odd"><td>gif17.gif</td><td></td><td align="center"><img src="/logotool/logo?logo=gif17.gif"></td> </tr>

I'm interested to see if your path starts with /sito or even just a '/' - it could be that the fix is as simple as specifying /logotool/logo in your themes settings, but I won't know until I see how comes the logos page works yet the main logo doesn't...

Thanks

Pobster

saxon’s picture

Here is the code:

<tbody>
<tr class="odd"><td>01.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=01.jpg"></td> </tr>
<tr class="even"><td>02.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=02.jpg"></td> </tr>
<tr class="odd"><td>03.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=03.jpg"></td> </tr>
<tr class="even"><td>04.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=04.jpg"></td> </tr>
<tr class="odd"><td>05.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=05.jpg"></td> </tr>
<tr class="even"><td>06.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=06.jpg"></td> </tr>
<tr class="odd"><td>07.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=07.jpg"></td> </tr>
<tr class="even"><td>08.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=08.jpg"></td> </tr>
<tr class="odd"><td>09.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=09.jpg"></td> </tr>
<tr class="even"><td>10.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=10.jpg"></td> </tr>
<tr class="odd"><td>11.jpg</td><td></td><td align="center"><img src="/logotool/logo?logo=11.jpg"></td> </tr>
</tbody>

I think you're right !

Thank you,
Danilo

pobster’s picture

According to what you posted above, a single logo should be accessible by navigating to '/logotool/logo?logo=01.jpg' (to take one example) - I however receive a 404 Not Found page when I try to view this page however it is not a Drupal 404 page, but a webserver one (ie. it's a blank page with some text on it). This happens with trying both '/logotool/logo?logo=01.jpg' and '/sito/logotool/logo?logo=01.jpg' which is odd... Mind you nothing seems to generate a Drupal 404 page if you do it this way? The only way I can see to gain an actual Drupal 404 page is to use something for example like '?q=logotool/logo?logo=01.jpg'.

So... This leads to a bit of confusion... You've either a configuration error (perhaps with your .htaccess file?) else perhaps as I've only ever tested the module using clean urls - you maybe will have to access the logo using ?q=logotool/logo instead? TBH I'm really not sure... It could even be down to (as you very first said) the i18n module...

...Is it not possible to try clean urls on your server? Have you perhaps tried before and your site got messed up?

Pobster

saxon’s picture

Unfortunately my host does not offer the possibility to get clean urls.
I'm recreating the same site without the i18n module...
I'll be back soon,
Danilo

pobster’s picture

You know I'm not convinced that it is that i18n module that's causing the issue here... This is what I'm thinking;

What we know - even though I cannot myself access your logos by navigating to "/logotool/logo?..." that *does* appear to work for you on the screen that lists all the logos. What doesn't work is that when you enter "logotool/logo" into your theme, Drupal appends this with the directory 'sito' which is where the problem comes in... It's this which Drupal can't find and I confess I've no idea why? But it does lead me to some more questions though.

Your site has a front page which doesn't have 'sito' appended to it? How have you done this?
In your settings.php file, have you filled out (and uncommented) the base_url variable?
Can you on your server type in "http://www.mariomarzi.net/logotool/logo" or perhaps "http://www.mariomarzi.net/logotool/logo?logo=gif1.gif" and receive a logo directly?

I'm still thinking that maybe this has something to do with configuration perhaps? I mean to be honest the screen which displays all your logos actually shouldn't work! It only works for you because I've actually made a mistake with how I've hardcoded the image production. If I fix it then I reckon that screen will break for you because it should then append 'sito' to the front of the image url. This is very odd as this is how it's supposed to work... The menu_hook in the code is supposed to ignore your subdirectory (if you have one) meaning it *should* be working the other way round to what it is? It should match /sito/... and not well... not the base '/' that is matching? I'm really hoping that you're doing something bizarre with your subdirectory and/ or your .htaccess rules? Something isn't right with your set up - I'm sure of it :o(

Pobster

saxon’s picture

> Your site has a front page which doesn't have 'sito' appended to it?
> How have you done this?

It's an index.html in the public_html root.

> In your settings.php file, have you filled out (and uncommented)
> the base_url variable?

Yes: $base_url = 'http://www.mariomarzi.net/sito';

> Can you on your server type in "http://www.mariomarzi.net/logotool/logo"
> or perhaps "http://www.mariomarzi.net/logotool/logo?logo=gif1.gif"
> and receive a logo directly?

No, also in my local server (both are on linux)

> I'm really hoping that you're doing something bizarre with your subdirectory
> and/ or your .htaccess rules?

It's not the .htaccess.

> Something isn't right with your set up - I'm sure of it

I hope so. I'm harldy looking for a possible reason...
May I give you the administration http-password so that you can give a better look ?

See you soon,
Danilo

saxon’s picture

Is it a problem if images are jpegs instead of gifs ?

pobster’s picture

Nah doesn't/ shouldn't make a difference - beside you said that the images work fine on the logos screen. I forget did you try using '?q=logotool/logo' on your themes settings page? Just want to cross off the obvious first.

Pobster

saxon’s picture

> Nah doesn't/ shouldn't make a difference

No difference.

> I forget did you try using '?q=logotool/logo' on your themes settings page?

Yes I did, among the others

> Just want to cross off the obvious first.

Correct.
... but...
in this moment I've drupal at http://localhost/
and there's always the ALT-link to the home page intead of the image !

Be obvious, please.

PS
Anyway I know what I're speaking about ;-)

saxon’s picture

ops: ... we're speaking about.

hass’s picture

check out the path under http://drupal.org/node/119187, please.

saxon’s picture

Applying the patch (with and without the '-p0' option), everything disappear in ?q=admin/settings/logotool but the 'save configuration' and 'reset to defaults' commands.
In ?q=admin/settings/logotool/logos I finally see the images
The logo is always in ALT-text mode.
I think you're finding the solution !

Thank you,
Danilo

pobster’s picture

You said you could see those images anyway didn't you?

"In 'admin/settings/logotool/logos' I can see all the images I uploaded in 'modules/logotool/logos'"

Pobster

hass’s picture

<?q=admin/settings/logotool but the 'save configuration' and 'reset to defaults' commands.

sorry, what disappear? The menu? clear out your cache please... DELETE FROM cache. i have tested the patch with clean urls and without...

pobster’s picture

Okay I give up :o( I can't debug this without access to your site - could you contact me using my contact form and provide me with temporary administrator access.

Thanks

Pobster

saxon’s picture

work in progress ;-)

pobster’s picture

Assigned: Unassigned » pobster
Status: Active » Closed (fixed)

I'm pretty sure that using the newest version of logotool will fix your problems but I've not heard from you in ages... I'm tempted to close this issue as I'm sure it's resolved using this download; http://drupal.org/node/133749

Pobster
...Yes I'm closing it...