When you go to edit your profile or manage avatars, the path to the avatar is "undefined". I am using the latest version and there is no path in the database except for the avatar name. Once you select an avatar, it will show properly on your postings and public profile page.

I am using Drupal 6.2

Comments

stella’s picture

Status: Active » Fixed

Sounds like you didn't run update.php. You should be able to fix the issue by doing a "bulk upload" on the avatar selection settings page. The database is not meant to store anything other than the avatar name in the latest version.

Cheers,
Stella

Wayne_Luke’s picture

I haven't updated. I just installed it for the first time. Running update.php returns the following errors:

Table 'dp_avatar_selection' already exists query: CREATE TABLE dp_avatar_selection ( `avatar` VARCHAR(255) NOT NULL, `access` VARCHAR(255) DEFAULT NULL, PRIMARY KEY (avatar), UNIQUE KEY avatar (avatar) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /var/www/vhosts/avgreenliving.com/httpdocs/includes/database.inc on line 509.

Duplicate column name 'og_access' query: ALTER TABLE dp_avatar_selection ADD `og_access` VARCHAR(255) DEFAULT NULL in /var/www/vhosts/avgreenliving.com/httpdocs/includes/database.mysql-common.inc on line 298.

I am guessing that the second error refers to organic groups but I have never installed that. Should I truncate the avatar_selection table before adding them again?

Wayne_Luke’s picture

StatusFileSize
new32.87 KB
new27.15 KB
new20.82 KB

Truncated the table and ran the bulk upload again. No change in the avatar selection widgets.

Uploaded some screenshots.

stella’s picture

Status: Fixed » Active
stella’s picture

What is the path to the file in the "users" table? The "avatar" column in the "avatar_selection" table should just contain the filename, no path, so that is perfectly correct.

Are you by any chance using the "private" file download method (admin/settings/file-system)? Does changing it to public fix the issue? Also if using private files please ensure that the directory is not accessible over the web.

Cheers,
Stella

Wayne_Luke’s picture

Using Public file download at this time and the path is set to /sites/default/files/ under Site Configuration -> File System (admin/settings/file-system). This is the value that has been set since installation.

Where the avatar shows correctly (e.g. avatarissue2.png above) the path reflects this properly as %URL%/sites/defaults/files/avatar_selection/%avatarname.ext%.

Where the avatar doesn't show, properties for the image path reflects %URL%/undefined/%avatarname.ext%.

stella’s picture

Can you confirm that you have javascript enabled? If so, when you view the page source, you should see a line near the top starting something like:

<script type="text/javascript">jQuery.extend(Drupal.settings, { "basePath": "/", .......

Can you send me this line from the page source of one of the pages where the images fail to appear please?

Or can you send me the url to the site where this is happening?

Cheers,
Stella

Wayne_Luke’s picture

I have sent you login information for the site via your contact form.

stella’s picture

Category: bug » support
Status: Active » Fixed

Hi Wayne_Luke,

Thanks for that. I'm pretty sure I know what the solution is. When you upgraded you never updated the avatar_selection/js/avatar_selection.js file.

I was confused for a while since the version number matched the one in CVS, but that was due to an incorrect $Id line in the file which caused the version number not to be updated on subsequent check-ins. This is fixed now.

In any case you can use the latest js file from the 6.x-1.3 release or you can grab it from here.

Cheers,
Stella

Wayne_Luke’s picture

Thanks. I deleted all the files, downloaded a fresh package from drupal.org and uploaded again and it is working now. Not sure why the files were out of date. I had downloaded the previous version but not installed it before 6.x-1.3 came out. Might have mixed them somehow while unzipping them.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.