Keyword

Can't add attachment in add item dialogue

  • Surdo
  • Surdo's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 2 months ago #173180 by Surdo
Hello,

I have K2 version 2.9.0 installed on a website. If I try to add a new item in a category view page and then add an attachment to it, the attachment button fails to open a file dialogue. Another thing that looks odd, is the way the various image, media, attachment options are displayed. I remember them being displayed in tabs, however now they are displayed in an unformulated list. Please see the attached screenshot. I hope this may offer a clue. In the screenshot, "Anexos" stands for attachments.

I am able to open a file dialogue for the image option, also embed youtube videos.

Hope someone can help!

Thanks,
Attachments:

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

More
5 years 1 month ago #173207 by JoomlaWorks
Replied by JoomlaWorks on topic Can't add attachment in add item dialogue
This indicates that something (possibly your template or a system plugin) is breaking JS inside the K2 edit form. If you use a plugin like JCH Optimize, make sure that it does not concatenate JS. If not, check if your template has a similar feature. Finally, open up your browser's dev tools and switch to the "Console" tab. Reload the page in question and click to add/edit a K2 item. What errors show up in the browser's "Console" tab?

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

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

  • Surdo
  • Surdo's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 1 month ago #173212 by Surdo
Replied by Surdo on topic Can't add attachment in add item dialogue
Thanks a lot Fotis. I checked the template and it did have a "Optimize JS" option selected. I have deselected this but the problem continues. I'm looking through the plugins at the moment. When I click on a "Add a new item in this category" button, I get an error and one additional message in the console tab:

Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=block: expected semicolon at character position 13. The default protections will be applied.
jquery-migrate.min.js?84f742cf40c3f88d54f26136e23ee75a:2 JQMIGRATE: Migrate is installed, version 1.4.1

All the best,

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

  • Surdo
  • Surdo's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 1 month ago #173215 by Surdo
Replied by Surdo on topic Can't add attachment in add item dialogue
When I mentioned the Optimize JS option, that was in Extensions->Templates->Styles
When I go to Extensions->Templates->Templates and open the template in question, there is a directory permissions error:

"Error
The template folder is not writable. Some features may not work."

Perhaps this is causing the problem. I can't change the permissions for the folder directly. What should the permissions be exactly?

Thanks,

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

More
5 years 1 month ago #173217 by JoomlaWorks
Replied by JoomlaWorks on topic Can't add attachment in add item dialogue
The "X-XSS-Protection..." error indicates some plugin (or your server) sends an HTTP header with incorrect syntax. But I doubt that breaks the page.

However, if you have permission issues, perhaps the site (=PHP) can't request some files from the server.

I recommend you ask your hosting company that they repair "ownership" permissions in your hosting account and also repair access permissions to 0755 for folders and 0644 for files.

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

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

  • Surdo
  • Surdo's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 1 month ago #173219 by Surdo
Replied by Surdo on topic Can't add attachment in add item dialogue
Actually the permission problem is unrelated. I checked on my local installation of the website and it has no such issues. It does however have the same problem of not being able to add attachments. There are no errors given in the local installation when I add a new item. Making it hard to identify the problem...

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

More
5 years 1 month ago #173221 by JoomlaWorks
Replied by JoomlaWorks on topic Can't add attachment in add item dialogue
Check if you have an old override in /templates/YOUR_JOOMLA_TEMPLATE/html/com_k2/default/itemform.php and delete that file.

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

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

  • Surdo
  • Surdo's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 1 month ago #173227 by Surdo
Replied by Surdo on topic Can't add attachment in add item dialogue
Thank you very much Fotis, that seems to be it! You meant to delete the itemform.php file itself, correct? I renamed it and the problem is solved.

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

More
5 years 1 month ago #173229 by JoomlaWorks
Replied by JoomlaWorks on topic Can't add attachment in add item dialogue
Yes, you can safely delete it.

Fotis / 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