Button images not showing on first load

Posts from previous Beta sessions

Button images not showing on first load

Postby poetter » Sat Oct 13, 2007 8:49 pm

Hi,

tuigii report a problem with button images not showing up on first load. Looking at the html source they are linked with full file path.

A look in menu.php show that:

line 706 -
Code: Select all
            if( !empty($button['icon']) )
            {
               if( strpos($button['icon'],'.') !== false )
               {
                  $button['icon'] = ROSTER_PATH . 'addons/' . $button['basename'] . '/images/' . $button['icon'];
               }
               else
               {
                  $button['icon'] = $roster->config['interface_url'].'Interface/Icons/' . $button['icon'] . '.' . $roster->config['img_suffix'];
               }
            }


Shouldn't that be ?
Code: Select all
            if( !empty($button['icon']) )
            {
               if( strpos($button['icon'],'.') !== false )
               {
                  $button['icon'] = ROSTER_URL . 'addons/' . $button['basename'] . '/images/' . $button['icon'];
               }
               else
               {
                  $button['icon'] = $roster->config['interface_url'].'Interface/Icons/' . $button['icon'] . '.' . $roster->config['img_suffix'];
               }
            }
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Button images not showing on first load

Postby zanix » Sat Oct 13, 2007 10:04 pm

The only difference between ROSTER_PATH and ROSTER_URL is that ROSTER_URL has 'http://www.yoursite.com' added to it

I looked at tuigii's site and no matter what one you use, it still wouldn't be right
Code: Select all
ROSTER_PATH = /home.10.14/papyteam/www/roster/
ROSTER_URL = http://www.papy-team.fr/home.10.14/papyteam/www/roster/


Then when you click on anything, the links fix themselves
Code: Select all
ROSTER_PATH = /roster/
ROSTER_URL = http://www.papy-team.fr/roster/


He must be using some sort of re-direct that isn't working correctly
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Button images not showing on first load

Postby poetter » Sat Oct 13, 2007 10:12 pm

May be he can clear up this for us.
Image
User avatar
poetter
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 462
Joined: Sat Jun 30, 2007 9:41 pm
Location: Germany/Hamburg

Re: Button images not showing on first load

Postby tuigii » Sat Oct 13, 2007 11:27 pm

Beg you both pardon ?? ( :D )

The main roster is in 'roster/' (reinstalled a couple of days ago)
Init all addons, downloaded ArmorySync this morning yesterday - activated it. And saw this happening.
Diagnostic = 100 % ok.

I have a index.html in the root, if that's what you mean:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Papy Team</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv='refresh' content='0;url=http://www.papy-team.fr/forum' />
</html>

But imho this can't have any infleunce on a URL path like
http://www.papy-team.fr/roster (when used directly)

Note that patching, testing, hacking, etc is done in http://www.papy-team.fr/roster-off/ (to circumvent finding troubles that I produced myself :wink: )

On the other hand : is it only me (or my hoster) ?
My server didn't showed this kind of 'errors' before - neither WoWRoster, neither ArmorySync.

Btw : I have 3 rosters to maintain : this one http://www.les-grands-croises.fr/roster/index.php = version ArmorySync 268 !! doesn't show this behavour (same web hoster - WoWRoster up to date).

===> Hummmm. found something.
Main root dir : .htaccess
Code: Select all
SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 1
SetEnv PHP_VER 5
RewriteEngine on
RewriteBase /
RewriteRule ^/?roster/(sig|av)/(.*)\.png$ ./roster/index.php?p=util-siggen-$1&saveonly=0&member=$2


roster/.htaccess
Code: Select all
 WoWRoster .htaccess file
# $Id: .htaccess 1254 2007-08-19 16:41:28Z Zanix $

# ONLY IF MOD_REWRITE IS INSTALLED
<IfModule mod_rewrite.c>
   # ENABLE ENGINE
   RewriteEngine On

   # CONIDITIONS
   RewriteCond %{REQUEST_FILENAME} -f [OR]
   RewriteCond %{REQUEST_FILENAME} -d

   # REWRITE RULES
   RewriteRule ^(.+) - [PT,L]
   RewriteRule ^(.*) index.php
</IfModule>

Renaming this roster/.htaccess file will stop the issue !!!!
Does it harm to de-activate this file ? (all seem to work = images are showing up, still when doing so)
I have to think - it must be having a local problem.... I don't get it

Anyway - killed the second htaccess file - no more 'missing image problem'.

Il dive into ReWrite... apache syntax to understand what is/could happening.
Last edited by tuigii on Sat Oct 13, 2007 11:35 pm, edited 1 time in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Button images not showing on first load

Postby zanix » Sun Oct 14, 2007 7:51 am

The .htaccess file is only for the Alternative URLs setting in RosterCP
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Button images not showing on first load

Postby tuigii » Mon Oct 15, 2007 5:43 pm

Update :

Code: Select all
if( !empty($button['icon']) )
{
   if( strpos($button['icon'],'.') !== false )
   {
      $button['icon'] = ROSTER_PATH . 'addons/' . $button['basename'] . '/images/' . $button['icon'];
   }
   else
   {
      $button['icon'] = $roster->config['interface_url'].'Interface/Icons/' . $button['icon'] . '.' . $roster->config['img_suffix'];
   }
}


All addons use a generic icon, available in the Interface/Icons folder.
ArmorySync is using home brew icons, indicated by a filename dot extension, like as_memberlist.jpg.
That's why the first block of code is used. This one use ROSTER_PATH predefined varaible.
That's the one failing in my case 'ones in a while' ( :shock: )....

Still searching :wink:

[edit]

Hummmmm.
It seems that for raisons beyond logic that
$_SERVER contains ones in while a
/home.10.14/papyteam/www/roster/
Instead of a more logic
/roster/index.php
/home.10.14/papyteam/ is more like the address of the system my server is living on.
The why part could be anything, but I'm not gona loose time on this one. It's NOT a WoWRoster issue. It must be some internal web hoster server issue that's faulting.

When I get fed up with it (didn't saw any strange things today or yesterday) I'll hardcode the thing.
Last edited by tuigii on Tue Oct 16, 2007 3:35 pm, edited 2 times in total.
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Re: Button images not showing on first load

Postby tuigii » Sat Oct 20, 2007 12:37 am

Just to close and burry this subject.

I had a stable PHP 5.0.2.5-pre before. Was running ok (from what I know :wink: ).

Then a clever guy at ovh.fr (my web & site supplier) decided to install 5.2.5-RC1 (it was out for about a week, last week) :shock:

They actually decided to use a real RC1 on 430 000 sites (dedicated - shared server - virtual servers and the lot).
In one night time, they upgraded their entire hosting farm.
Was quit a succes - they said so proudly.

But they really faced the beta 'RC1' concept next day : there were some bugs .....
=> source http://php.net !!!

Result : they went back to the stable 5.2.4 :D

And my problems were SOLVED.

Sorry for your time guys. Without knowing, I was doing a Beta on a RC1 - normal that I confrontated with some nasty 'bugs' - I was living in the future ...
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Button images not showing on first load

Postby zanix » Sat Oct 20, 2007 1:58 am

..and now we know
And knowing is half the battle...
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to Archived

Who is online

Users browsing this forum: No registered users and 1 guest

cron