Keyword

K2 content module : impossible to save or close when creating or amending module

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
6 months 2 weeks ago #175741 by jobart
Hello everybody !

I am quite stuck with K2 for developping my website currently in Localhost.

I try to create or amend a new K2 content module. Then, it is impossible to save or close the page... So, it is impossible to use K2 for my blog.

I google a lot, but I did not find any solution. I clear both browser and joomla caches : it does not work. My Joomla and K2 version are also the last version.

Below is the result of my logs. I understand nothing : I am not a pro dev.
SyntaxError: unexpected token: identifier
index.php:258:65
window.writeDynaList() is deprecated without a replacement! core.js:1:4528
TypeError: o is null
core.js:1:207
submitform http://localhost/champion/media/system/js/core.js?508ed6e6d0e6f6655b2c9e3ca1de0fdf:1
submitbutton http://localhost/champion/media/system/js/core.js?508ed6e6d0e6f6655b2c9e3ca1de0fdf:1
onclick http://localhost/champion/administrator/index.php?option=com_modules&view=module&layout=edit&id=191:1
TypeError: o is nullcore.js:1:207
submitform http://localhost/champion/media/system/js/core.js?508ed6e6d0e6f6655b2c9e3ca1de0fdf:1
submitbutton http://localhost/champion/media/system/js/core.js?508ed6e6d0e6f6655b2c9e3ca1de0fdf:1
onclick http://localhost/champion/administrator/index.php?option=com_modules&view=module&layout=edit&id=191:1

If someone could help, I would be very grateful !

Kind regards

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
6 months 2 weeks ago #175743 by Fotis
LOL, that's not even K2...

This is probably the result of some crappy 3rd party system plugin in Joomla.

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.

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
6 months 2 weeks ago #175747 by jobart
Thank you Fotis ! At least, you have noticed that I am not a specialist.

I was assuming that the issue was from the K2 content module, as I can save and close for other modules.

But anyway, how can I identify this third party plug-in ?

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

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
6 months 2 weeks ago #175748 by jobart
Well, I am still working on my issue.

I have this error message on any K2 content module back-end page :

Notice: Array to string conversion in C:\wamp64\www\administrator\components\com_k2\elements\moduletemplate.php on line 64

The content of moduletemplate.php is the following :

class K2ElementModuleTemplate extends K2Element
{
public function fetchElement($name, $value, &$node, $control_name)
{
jimport('joomla.filesystem.folder');
if (K2_JVERSION != '15') {
$moduleName = $node->attributes()->modulename;
} else {
$moduleName = $node->_attributes;
}
$moduleTemplatesPath = JPATH_SITE.'/modules/'.$moduleName.'/tmpl';
$moduleTemplatesFolders = JFolder::folders($moduleTemplatesPath);

$db = JFactory::getDbo();
if (K2_JVERSION != '15') {
$query = "SELECT template FROM #__template_styles WHERE client_id = 0 AND home = 1";
} else {
$query = "SELECT template FROM #__templates_menu WHERE client_id = 0 AND menuid = 0";
}
$db->setQuery($query);
$defaultemplate = $db->loadResult();
$templatePath = JPATH_SITE.'/templates/'.$defaultemplate.'/html/'.$moduleName;

if (JFolder::exists($templatePath)) {
$templateFolders = JFolder::folders($templatePath);
$folders = @array_merge($templateFolders, $moduleTemplatesFolders);
$folders = @array_unique($folders);
} else {
$folders = $moduleTemplatesFolders;
}

$exclude = 'Default';
$options = array();

foreach ($folders as $folder) {
if (preg_match(chr(1).$exclude.chr(1), $folder)) {
continue;
}
$options[] = JHTML::_('select.option', $folder, $folder);
}

array_unshift($options, JHTML::_('select.option', 'Default', '-- '.JText::_('K2_USE_DEFAULT').' --'));

if (K2_JVERSION != '15') {
$fieldName = $name;
} else {
$fieldName = $control_name.'';
}

return JHTML::_('select.genericlist', $options, $fieldName, 'class="inputbox"', 'value', 'text', $value, $control_name.$name);
}
}

Last line seems to be the problem.

But I do not know how to remedy it...

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

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
6 months 2 weeks ago #175749 by jobart
I find the issue !!!

It came from the French K2 translation... I uninstall it, and now it works...

But, a new issue happens, I need a website in French language and not in English.

If someone can help me, it would be nice.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
6 months 2 weeks ago #175762 by Fotis
If you originally downloaded the French language package from getk2.org more than 2 weeks ago, then please download it again. I've applied a fix for to replace strings "_QQ_" that were causing problems in the Joomla backend. These strings were used at some point in the past to allow double quotes in language 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.

  • Дмитрий Коваленко
  • Дмитрий Коваленко's Avatar
  • Offline
  • New Member
More
6 months 2 weeks ago #175824 by Дмитрий Коваленко
Replied by Дмитрий Коваленко on topic K2 content module : impossible to save or close when creating or amending module
Hello.
I have the same problem with the language pack as jobart. Only with ru-RU. When you remove a language pack, K2 health returns.
When installing the French language pack, the problems are the same.

The only language pack that works uk-UA. But there is practically nothing translated from en-GB.

I tried to find errors in ru-RU comparing with en-GB. Did not work out.

I would be grateful if you tell me which file to look for.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
6 months 1 week ago #175832 by Fotis
Did you recently installed one of these language packs?

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.

  • Дмитрий Коваленко
  • Дмитрий Коваленко's Avatar
  • Offline
  • New Member
More
6 months 1 week ago #175839 by Дмитрий Коваленко
Replied by Дмитрий Коваленко on topic K2 content module : impossible to save or close when creating or amending module
Yes. Installed on May 14th.
I also tried version K2 2.10.2 and 2.10.3
Joomla version - 3.9.18
In addition, the ZOO and jomsocial components are installed.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
6 months 1 week ago #175841 by Fotis
I can't find any syntax issues in the ru-RU package for K2. I would recommend opening the Joomla debugger and making sure it shows language strings as well. You might spot the error that way.

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.


Powered by Kunena Forum