- Posts: 15
COMMUNITY FORUM
bUG? Error k2 attachment renames a file when uploaded
- Vassilis
- Topic Author
- Offline
- New Member
Less
More
14 years 8 months ago #77229
by Vassilis
bUG? Error k2 attachment renames a file when uploaded was created by Vassilis
Hi,
everytime i upload a file (attachment) like .doc or .rar, .zip etc the system renames the file to something like file.doc.txt instead of file.doc
I am using the latest build of K2.
everytime i upload a file (attachment) like .doc or .rar, .zip etc the system renames the file to something like file.doc.txt instead of file.doc
I am using the latest build of K2.
Please Log in or Create an account to join the conversation.
- Vassilis
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
14 years 8 months ago #77230
by Vassilis
Replied by Vassilis on topic bUG? Error k2 attachment renames a file when uploaded
anyone?
Please Log in or Create an account to join the conversation.
- kabeza
- Offline
- Senior Member
- www.beza.com.ar
14 years 2 months ago #77231
by kabeza
Custom Joomla templates<br />www.beza.com.ar
Replied by kabeza on topic bUG? Error k2 attachment renames a file when uploaded
Hi Vassilis
I'm having the same issue. Didn't try with the latest version 2.3, but I have to fix the already installed 2.2
Look:
If anyone can help us with this...
I'm having the same issue. Didn't try with the latest version 2.3, but I have to fix the already installed 2.2
Look:
If anyone can help us with this...
Custom Joomla templates<br />www.beza.com.ar
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
14 years 2 months ago #77232
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic bUG? Error k2 attachment renames a file when uploaded
Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try:
1. Update K2 to it's latest version. It also updates the specific class to it's latest version.
2. Upload the file from a different browser.
1. Update K2 to it's latest version. It also updates the specific class to it's latest version.
2. Upload the file from a different browser.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- kabeza
- Offline
- Senior Member
- www.beza.com.ar
14 years 2 months ago #77233
by kabeza
Custom Joomla templates<br />www.beza.com.ar
Replied by kabeza on topic bUG? Error k2 attachment renames a file when uploaded
Tried with Firefox, Opera and Chrome. All with same result
I think I'll try upgrading to 2.3
Lefteris Kavadas said:Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try: 1. Update K2 to it's latest version. It also updates the specific class to it's latest version.
2. Upload the file from a different browser.
I think I'll try upgrading to 2.3
Lefteris Kavadas said:Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try: 1. Update K2 to it's latest version. It also updates the specific class to it's latest version.
2. Upload the file from a different browser.
Custom Joomla templates<br />www.beza.com.ar
Please Log in or Create an account to join the conversation.
- Vassilis
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
14 years 2 months ago #77234
by Vassilis
Replied by Vassilis on topic bUG? Error k2 attachment renames a file when uploaded
Hi Lefteris,
i still have teh same problem.
In every K2 site i create.
From every browser and with the latest version...
Any solution plz?
Lefteris Kavadas said:Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try: 1. Update K2 to it's latest version. It also updates the specific class to it's latest version. 2. Upload the file from a different browser.
i still have teh same problem.
In every K2 site i create.
From every browser and with the latest version...
Any solution plz?
Lefteris Kavadas said:Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try: 1. Update K2 to it's latest version. It also updates the specific class to it's latest version. 2. Upload the file from a different browser.
Please Log in or Create an account to join the conversation.
- kabeza
- Offline
- Senior Member
- www.beza.com.ar
14 years 2 months ago #77235
by kabeza
Custom Joomla templates<br />www.beza.com.ar
Replied by kabeza on topic bUG? Error k2 attachment renames a file when uploaded
I finally did:
1- backup to jos_k2_*** tables in phpmyadmin
2- backup media/k2 folder in ftp
3- removed k2 v2.2
4- installed k2 v2.3
5- restored sql backup from point 1 (restored the original jos_k2_*** tables)
6- removed .txt from each media/k2/attachtments file (you can do this in your pc with a multiple renamer software)
7- uploaded k2 folder to media/k2 in ftp (overwrote everything)
8- removed .txt manually from each record in the jos_k2_attachtments table
It is a long and kinda complicated process, but I guess it is working fine now
PS: Software still shows v.2.2 in the control panel... I guess we'll have to do another upgrade soon
Vassilis said:Hi Lefteris, i still have teh same problem.
In every K2 site i create.
From every browser and with the latest version...
Any solution plz?
Lefteris Kavadas said:Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try: 1. Update K2 to it's latest version. It also updates the specific class to it's latest version. 2. Upload the file from a different browser.
1- backup to jos_k2_*** tables in phpmyadmin
2- backup media/k2 folder in ftp
3- removed k2 v2.2
4- installed k2 v2.3
5- restored sql backup from point 1 (restored the original jos_k2_*** tables)
6- removed .txt from each media/k2/attachtments file (you can do this in your pc with a multiple renamer software)
7- uploaded k2 folder to media/k2 in ftp (overwrote everything)
8- removed .txt manually from each record in the jos_k2_attachtments table
It is a long and kinda complicated process, but I guess it is working fine now
PS: Software still shows v.2.2 in the control panel... I guess we'll have to do another upgrade soon
Vassilis said:Hi Lefteris, i still have teh same problem.
In every K2 site i create.
From every browser and with the latest version...
Any solution plz?
Lefteris Kavadas said:Hi. This is a mime detection problem. It seems that the class.upload.php fails to detect the correct mime type on your system. You can try: 1. Update K2 to it's latest version. It also updates the specific class to it's latest version. 2. Upload the file from a different browser.
Custom Joomla templates<br />www.beza.com.ar
Please Log in or Create an account to join the conversation.
- Vassilis
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
14 years 2 months ago #77236
by Vassilis
Replied by Vassilis on topic bUG? Error k2 attachment renames a file when uploaded
Hi Enrique,
i think i find a solution that works.
In file: class.upload.php (inside >> \administrator\components\com_k2\lib)
Arround the line: 2230
I take this >>
$this->file_src_mime = mime_content_type($this->file_src_pathname);
and change it to this >>
$this->file_src_mime = mime_content_type($this->file_src_name);
After that it works.
But it is very strange why in the v2.3 this isn't fixed :/
Thx for the help anyway ;)
i think i find a solution that works.
In file: class.upload.php (inside >> \administrator\components\com_k2\lib)
Arround the line: 2230
I take this >>
$this->file_src_mime = mime_content_type($this->file_src_pathname);
and change it to this >>
$this->file_src_mime = mime_content_type($this->file_src_name);
After that it works.
But it is very strange why in the v2.3 this isn't fixed :/
Thx for the help anyway ;)
Please Log in or Create an account to join the conversation.
- kabeza
- Offline
- Senior Member
- www.beza.com.ar
14 years 2 months ago #77237
by kabeza
Custom Joomla templates<br />www.beza.com.ar
Replied by kabeza on topic bUG? Error k2 attachment renames a file when uploaded
Wow
It was just a so simple hack, would love to have known before lol
Thanks!
Vassilis said:Hi Enrique, i think i find a solution that works.
In file: class.upload.php (inside >> \administrator\components\com_k2\lib)
Arround the line: 2230
I take this >>
$this->file_src_mime = mime_content_type($this->file_src_pathname);
and change it to this >>
$this->file_src_mime = mime_content_type($this->file_src_name);
After that it works.
But it is very strange why in the v2.3 this isn't fixed :/
Thx for the help anyway ;)
It was just a so simple hack, would love to have known before lol
Thanks!
Vassilis said:Hi Enrique, i think i find a solution that works.
In file: class.upload.php (inside >> \administrator\components\com_k2\lib)
Arround the line: 2230
I take this >>
$this->file_src_mime = mime_content_type($this->file_src_pathname);
and change it to this >>
$this->file_src_mime = mime_content_type($this->file_src_name);
After that it works.
But it is very strange why in the v2.3 this isn't fixed :/
Thx for the help anyway ;)
Custom Joomla templates<br />www.beza.com.ar
Please Log in or Create an account to join the conversation.
- Johnny Violent
- Offline
- New Member
Less
More
- Posts: 2
13 years 11 months ago #77238
by Johnny Violent
Replied by Johnny Violent on topic bUG? Error k2 attachment renames a file when uploaded
Hm, that resolved the bug - unfortunately by updating to 2.4.1 the error occurs again. And editing the code results in a blank attachment filename. Any ideas?
Thx in advance,
Andi.
Enrique Becerra said:Wow It was just a so simple hack, would love to have known before lol
Thanks!
Vassilis said:Hi Enrique, i think i find a solution that works.
In file: class.upload.php (inside >> \administrator\components\com_k2\lib)
Arround the line: 2230
I take this >>
$this->file_src_mime = mime_content_type($this->file_src_pathname);
and change it to this >>
$this->file_src_mime = mime_content_type($this->file_src_name);
After that it works.
But it is very strange why in the v2.3 this isn't fixed :/
Thx for the help anyway ;)
Thx in advance,
Andi.
Enrique Becerra said:Wow It was just a so simple hack, would love to have known before lol
Thanks!
Vassilis said:Hi Enrique, i think i find a solution that works.
In file: class.upload.php (inside >> \administrator\components\com_k2\lib)
Arround the line: 2230
I take this >>
$this->file_src_mime = mime_content_type($this->file_src_pathname);
and change it to this >>
$this->file_src_mime = mime_content_type($this->file_src_name);
After that it works.
But it is very strange why in the v2.3 this isn't fixed :/
Thx for the help anyway ;)
Please Log in or Create an account to join the conversation.