OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



[OCS 2.3.3-1] [BUGFIX] Favicon .ico upload failed

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

[OCS 2.3.3-1] [BUGFIX] Favicon .ico upload failed

Postby petyovsky » Thu Jun 23, 2011 7:53 am

Hi.
Maybe this is fixed problem already. I'm newbie here.

Symptoms: I cannot upload favicon for the site.

See pictures.

favicon_bug1.jpg
favicon_bug1.jpg (36.56 KiB) Viewed 1848 times


favicon_bug2.jpg
favicon_bug2.jpg (48.07 KiB) Viewed 1848 times


Problem occured when server use older 'file' package up to the: file-5.05.

So, I made fix for this situation.
Patch is in the attachment,

Please for review and integration to the pkp/lib trunk.
It's only one line. ;-)

Thanks,
Pety.

FileManager.inc.php.patch
(497 Bytes) Downloaded 88 times
petyovsky
 
Posts: 3
Joined: Wed Jun 22, 2011 3:30 pm

Re: [OCS 2.3.3-1] [BUGFIX] Favicon .ico upload failed

Postby mcrider » Mon Jun 27, 2011 12:35 pm

Hi Pety,

Thanks -- I've committed your fix, see http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=6723.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: [OCS 2.3.3-1] [BUGFIX] Favicon .ico upload failed

Postby talknshare » Thu Oct 20, 2011 5:21 pm

This fix doesn't work for me.
I have the latest ojs version, and I am still getting the error message.
I check the file to patch and found out that I already have the line of code that you say will fix the bug in it.
Please let me know if you can replicate the problem.
Thanks.
talknshare
 
Posts: 27
Joined: Wed Oct 19, 2011 10:42 am

Re: [OCS 2.3.3-1] [BUGFIX] Favicon .ico upload failed

Postby jmacgreg » Mon Oct 31, 2011 1:41 pm

Hi talknshare,

I can't replicate this, and IIRC we haven't had code-specific problems with file uploads for a few versions now. Where exactly are you running into upload problems; which file-types; and have you checked out the FAQ, eg. this entry and possible also this entry?

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: [OCS 2.3.3-1] [BUGFIX] Favicon .ico upload failed

Postby tshore » Tue Nov 01, 2011 6:30 pm

I also can't upload a favicon. And, as talknshare says, the line of code in the patch is already there. I get this error:

Invalid favicon format or upload failed. Accepted formats are .ico, .png, and .gif.

I am able to upload both title images and logo images.
tshore
 
Posts: 264
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Re: [OCS 2.3.3-1] [BUGFIX] Favicon .ico upload failed

Postby mcrider » Wed Nov 02, 2011 10:47 am

Hi folks,

This problem is most likely due to the way your server handles the MIME types of ICO files. The mime_content_type function we use to detect MIME types uses a MIME "magic" file to detect file types based on the contents of the file, and does not always guess correctly. You can see what magic file PHP is using by looking in your phpinfo() output.

You can do some googling to see if you can find a better MIME magic file, or else just upload the ICO file to the root directory of your server (or use a PNG instead of an ICO file).

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: [OCS 2.3.3-1] [BUGFIX] Favicon .ico upload failed

Postby talknshare » Fri Nov 04, 2011 12:40 pm

[fixed]
Thanks Matt for your suggestion.

I was able to upload the favicon.ico in the directory: /public/journals/1/

Then I went to: /lib/pkp/templates/common/header.tpl and made following changes.

Removed:
{if $displayFavicon}<link rel="icon" href="{$faviconDir}/{$displayFavicon.uploadName|escape:"url"}" />{/if}

Inserted (right under the line with <head> tag):
<link rel="icon" href="http://domain.com/public/journals/1/favicon.ico" />

And it works!
Hope this helps to all others looking for a fix.
talknshare
 
Posts: 27
Joined: Wed Oct 19, 2011 10:42 am

Re: [OCS 2.3.3-1] [BUGFIX] Favicon .ico upload failed

Postby jayfitzsimmons » Fri Nov 11, 2011 10:53 am

Thank you talknshare! I followed your instructions and it worked for my journal too!
Jay
jayfitzsimmons
 
Posts: 78
Joined: Sun Aug 08, 2010 12:50 pm


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests