Keyword

Can't add attachment in add item dialogue

  • Surdo
  • Surdo's Avatar Topic Author
  • Offline
  • Junior Member
More
1 month 18 hours ago #173180 by Surdo
Surdo created the topic: Can't add attachment in add item dialogue
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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 3 days ago #173207 by Fotis
Fotis replied the 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?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Surdo
  • Surdo's Avatar Topic Author
  • Offline
  • Junior Member
More
3 weeks 3 days ago #173212 by Surdo
Surdo replied the 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
3 weeks 2 days ago #173215 by Surdo
Surdo replied the 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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 2 days ago #173217 by Fotis
Fotis replied the 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.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Surdo
  • Surdo's Avatar Topic Author
  • Offline
  • Junior Member
More
3 weeks 2 days ago #173219 by Surdo
Surdo replied the 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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 2 days ago #173221 by Fotis
Fotis replied the 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.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Surdo
  • Surdo's Avatar Topic Author
  • Offline
  • Junior Member
More
3 weeks 2 days ago #173227 by Surdo
Surdo replied the 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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 2 days ago #173229 by Fotis
Fotis replied the topic: Can't add attachment in add item dialogue
Yes, you can safely delete it.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

Moderators: william white

Powered by Kunena Forum