Keyword

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

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
4 years 11 months 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.

More
4 years 11 months ago #175743 by JoomlaWorks
LOL, that's not even K2...

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

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

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

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
4 years 11 months 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
4 years 11 months 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
4 years 11 months 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.

More
4 years 11 months ago #175762 by JoomlaWorks
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.

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

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

  • Дмитрий Коваленко
  • Дмитрий Коваленко's Avatar
  • Offline
  • New Member
More
4 years 11 months 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.

More
4 years 11 months ago #175832 by JoomlaWorks
Did you recently installed one of these language packs?

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

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

  • Дмитрий Коваленко
  • Дмитрий Коваленко's Avatar
  • Offline
  • New Member
More
4 years 11 months 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.

More
4 years 11 months ago #175841 by JoomlaWorks
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.

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

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

  • Дмитрий Коваленко
  • Дмитрий Коваленко's Avatar
  • Offline
  • New Member
More
4 years 11 months ago #175849 by Дмитрий Коваленко
Replied by Дмитрий Коваленко on topic K2 content module : impossible to save or close when creating or amending module
Hello.
I took advantage of your recommendation, checked everything with the joomla debugger. Found some errors in zoo but this did not help to solve the problem.

But he drew attention to the display of navigation elements in chrome. I enclose illustrations. When setting the localization, a problem appears, when uninstalling, it disappears.
And so every time. I tried different language packs. He even tried to assemble his own localization.

The situation is applicable to all buttons: save, save and close, cancel

Thanks for the help
Attachments:

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

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
4 years 11 months ago #175850 by jobart
Well, I am not alone ! The only solution I have found is to uninstall the language pack each time I need to change the K2 content module. Then I reinstall the language pack.

Anyway, I manage at least to migrate a first new version of my website to the server.

I have several errors with K2. But my IT skills are quite low.

I will try in a further post to give you the error I get.

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

More
4 years 11 months ago #175854 by JoomlaWorks
The problem arises from certain characters that these language packs may contain. I've added a filter in the export process to replace these characters so that they don't cause parsing issues in Joomla.

However there may be leftovers in some packages, so please let me know the exact language package you downloaded that caused problems.

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

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

  • Дмитрий Коваленко
  • Дмитрий Коваленко's Avatar
  • Offline
  • New Member
More
4 years 11 months ago #175856 by Дмитрий Коваленко
Replied by Дмитрий Коваленко on topic K2 content module : impossible to save or close when creating or amending module
I tried all the language packs ru-RU and uk-UA
The result is the same.

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

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
4 years 11 months ago #175858 by jobart
For my part, it was : k2_fr-FR_language_pack

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

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
4 years 11 months ago #175859 by jobart
I am going to be crazy... Now, even if I uninstall the language pack, I am stuck... I cannot save or close.

According to the dev console, I have the following error:
SyntaxError: unexpected token: identifier index.php:258:65

When I click on index.php:258:65, it reverts to the following part of code (I manually add line 258 for your identification):

jQuery(function($){ initPopovers(); $("body").on("subform-row-add", initPopovers); function initPopovers (event, container) { $(container || document).find(".hasPopover").popover({"html": true,"trigger": "hover focus","container": "body"});} });
jQuery(function($){ $("#myTab a").click(function (e) {e.preventDefault();$(this).tab("show");});});
jQuery(function($){ $("#myTabTabs").append($("<li class=\" active\"><a href=\"#general\" data-toggle=\"tab\">Module<\/a><\/li>")); });

// Set K2 version as global JS variable
K2JVersion = '30';

// Set Joomla version as class in the 'html' tag
(function(){
var addedClass = 'isJ30 k2ViewIsModule k2IsBackend';
if (document.getElementsByTagName('html')[0].className !== '') {
document.getElementsByTagName('html')[0].className += ' '+addedClass;
} else {
document.getElementsByTagName('html')[0].className = addedClass;
}
})();

// K2 Language Strings
line 258: var K2_THE_ENTRY_IS_ALREADY_IN_THE_LIST = 'L'entrée \'ENTRY_NAME_HERE\' est déjà dans la liste !';
var K2_REMOVE_THIS_ENTRY = 'Cliquez pour supprimer cette entrée';
var K2_THE_ENTRY_WAS_ADDED_IN_THE_LIST = 'L'entrée \'ENTRY_NAME_HERE\' a été ajoutée à la liste.';


I hope that we will be able to find a solution !

Kind regards

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

More
4 years 11 months ago #175863 by JoomlaWorks
JS breaks because of "'L'entrée" and the use of single quotes in the string.

Please install v2.10.4 (dev) from: getk2.org/downloads/?f=K2_Development_Release.zip

I have added text filters to resolve that issue.

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

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

  • Дмитрий Коваленко
  • Дмитрий Коваленко's Avatar
  • Offline
  • New Member
More
4 years 11 months ago #175868 by Дмитрий Коваленко
Replied by Дмитрий Коваленко on topic K2 content module : impossible to save or close when creating or amending module
Checked, everything works.

Thanks for the help.

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

More
4 years 11 months ago #175869 by JoomlaWorks
Great :)

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

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

  • jobart
  • jobart's Avatar Topic Author
  • Offline
  • New Member
More
4 years 11 months ago #175872 by jobart
Thank you Fotis : it works !!!

I have now an issue with the display of my blog, which did not exist with the stable version.

www.champion-avocats.com/blog-conseil-avocats

The display of the list of categories, last articles and search bar is not on the right, but on the bottom... I do not understand why, because it works before.

Is it a bug from the dev version or not ?

Kind regards

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


Powered by Kunena Forum