Keyword

Cannot attach attachments from server

  • Neil Forrester
  • Neil Forrester's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 5 months ago #153155 by Neil Forrester
Cannot attach attachments from server was created by Neil Forrester
Hello,

I am having issues attaching attachments to K2 Items from the server.

Files are named without spaces.
The file size is only 3meg.
The root directory for attachments is default.

THE ISSUE
1. If I browse to an attachment on my computer desktop the attachment works fine.
2. If I upload an attachment file - say PDF to the a folder on the server, and then try to attach the attachment file by ‘selecting a file on the server’ nothing happens. It just doesn’t work.

I only recently started noticing this happening with the recent K2 update.

Please see the video link to see what is happening.
www.youtube.com/watch?v=6F6hjRzVEYo&feature=youtu.be

Kind regards,
Neil.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 5 months ago #153175 by Krikor Boghossian
Replied by Krikor Boghossian on topic Cannot attach attachments from server
Hello Neil and thank you for reporting this.
You can view the progress of this issue here: github.com/getk2/k2/issues/302

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Neil Forrester
  • Neil Forrester's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 5 months ago #153222 by Neil Forrester
Replied by Neil Forrester on topic Cannot attach attachments from server
Hi Krikor,

Thanks for the link. I updated the k2.js in media/k2/assets/js on line 490:
"var k2ActiveAttachmentField = $K2(this).next()"

to

var k2ActiveAttachmentField = $K2(this).next().next()

Screen grab: imgur.com/dnLycsj

but it didn't work for me. Have I understood the instructions correctly?

Kind regards,
Neil.

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Elite Member
More
8 years 5 months ago #153228 by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Cannot attach attachments from server
Hello Neil,
The fix has been commited to the repository at github.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
8 years 3 months ago #155201 by nick
Replied by nick on topic Cannot attach attachments from server
I have the same issue, and I don't know about github, so how do we go about downloading and installing the fix for this?
Some simple instructions perhaps, please, would be greatly appreciated.
Also, uploading a 6mb file as an attachment goes to 100% but then the upload is lost! - it does not get attached. Is this issue related?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155208 by Krikor Boghossian
Replied by Krikor Boghossian on topic Cannot attach attachments from server
Hello you can backup and install the DEV version - github.com/getk2/k2

or you can manually apply the patch
github.com/getk2/k2/commit/672a50298e2ecef7ff5c9f280765bd34464f7cc2

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Neil Forrester
  • Neil Forrester's Avatar Topic Author
  • Offline
  • Junior Member
More
8 years 3 months ago - 8 years 3 months ago #155220 by Neil Forrester
Replied by Neil Forrester on topic Cannot attach attachments from server
Hi Nick,

I’ve made a video showing you what you need to do step by step.
www.youtube.com/watch?v=FLAE8l7R_VQ&feature=youtu.be

Or you can follow the instructions below.

Step 01 Get the new k2.js code
  1. Download the updated javascript file at this URL: github.com/getk2/k2/commit/672a50298e2ecef7ff5c9f280765bd34464f7cc2
  2. Click 'View' to see the new entire k2.js file you need to copy. you will then see all of the code.
  3. Click ‘Raw’ to view the raw code.
  4. Now select all of the code and copy it.

Step 02 Put the updated code in the k2.js file
  1. Login to your website Cpanel to edit the file (or you can use an FTP program if you prefer).
  2. In Cpanel click File Manager to view the files in your website. Click show hidden files if prompted.
  3. We now need to find the k2.js file by going to clicking media/k2/assets/js/k2.js
  4. Select the file k2.js and click edit.
  5. Paste in the new code we copied earlier.
  6. Save.

Note: If you are using an FTP program, download the file, open in Dreamweaver or text editor and paste in the new code. Save and replace the file on the server.

You may need to clear your browser cache and logout/login again to see it working.
Last edit: 8 years 3 months ago by Neil Forrester.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155224 by Krikor Boghossian
Replied by Krikor Boghossian on topic Cannot attach attachments from server
@Neil You rock :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum