The forum icon support is broken in 4.6 - currently if an icon path is provided in the user interface, it gets ignored anyway!

Changes required in the function _forum_icon() of forum.module. The main problem is the hardcoded path to the icons is currently:

$file = "misc/forum-$icon.png";

$output = theme('image', $file);

This is easily fixed by moving the 'misc' path to the variable_get() at the start of the function.
Then changing the way the $file variable is built up, as below.

$base_path = variable_get('forum_icon_path', 'misc');
...
$file = "$base_path/forum-$icon.png";
CommentFileSizeAuthor
#3 Forum.Image.Display.Folder.Issue.patch514 bytesrobin monks

Comments

budda’s picture

Priority: Normal » Critical

I'm having to modify Drupal core installs to fix this bug in forum.module.
Has it been addressed at all in CVS yet?
Sorry I've not submitted a patch to apply the fix.

The bug still exists in 4.6.1 release.

killes@www.drop.org’s picture

Priority: Critical » Normal

A missing icon is certainly not critical.

robin monks’s picture

Version: 4.6.0 »
Assigned: Unassigned » robin monks
StatusFileSize
new514 bytes

Here it is in patch form. I'll take responsibility of any required updates.

Robin

slidenby@twit.slidenby.com’s picture

I know I'm going to come off like an idiot... and I'm sorry... but can someone please quickly explain to me how to install this patch? I looked at the forum.module code and I see where the corosponding code is for the image locations... I'm just not exactly what I'm supposed to do from there, copy the code in the patch file?
Thanks, sorry again for being a noob at this

ezheidtmann’s picture

slidenby@twit.slidenby.com’s picture

Priority: Normal » Minor

I think this stuff is way over my head :) but ill try it, thanks so much for the link

robin monks’s picture

Priority: Minor » Normal

'tis a normal bug.

dries’s picture

Committed to HEAD and DRUPAL-4-6.

Anonymous’s picture