Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

exclamation-circle still problem with K2 front end editing

More
11 years 4 months ago #2499 by ligi
After reading all the wonderful comments from desperate people having issue, I got my hopes up again..But unfortunately the problem still exists.. I just migrated a site to Joomla 2.5, using the Joostrap basic template (responsive). K2 is essential for my client, however I cannot get frontend editing working. The Save and Cancel buttons will not close the modal popup. I know it's a template issue as K2 frontend editing works okay in the atomic template.
Any ideas how to solve this issue?????

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

More
11 years 4 months ago #2503 by admin
Hello,
do you have a URL I can check and see what may the problem be? The plugin works from the start for some people but most of the time there are extra tweaks that need to be done.

Olivier.

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

More
11 years 4 months ago #2519 by ligi
Tnx for your reply. Meanwhile found out some more specific things:
In this case the template is a Joostrap template. This template removes all Mootools code in the template unless it is overridden for certain menu items..

* ==================================================
* Disable mootools-more except for selected itemids to solve bootstrap conflicts
* ==================================================
*/
$enabledItemids = array();
$enabledMootoolsString = $this->params->get('mootoolsItemids', '');
$editingMootools = $this->params->get('editingMootools', 1);

// Decode the enabled Itemids array
if ($enabledMootoolsString != '')
{
$enabledItemids = explode(',', $enabledMootoolsString);
}

if ($editingMootools && ($option != 'com_content' || $view != 'form' || $layout != 'edit'))
{
$editingMootools = 0;
}

// If the itemId isn't in items that need mootools disable mootools
if (!$editingMootools && (empty($enabledItemids) || empty($itemId) || !in_array($itemId, $enabledItemids)))
{
// Disable mootools javascript
unset($doc->_scripts[$this->baseurl . '/media/system/js/mootools-core.js']);
unset($doc->_scripts[$this->baseurl . '/media/system/js/mootools-more.js']);
unset($doc->_scripts[$this->baseurl . '/media/system/js/core.js']);
unset($doc->_scripts[$this->baseurl . '/media/system/js/caption.js']);
unset($doc->_scripts[$this->baseurl . '/media/system/js/modal.js']);
unset($doc->_scripts[$this->baseurl . '/media/system/js/mootools.js']);
unset($doc->_scripts[$this->baseurl . '/plugins/system/mtupgrade/mootools.js']);

// Disable css stylesheets
// unset($doc->_styleSheets[$this->baseurl . '/media/system/css/modal.css']);
}


the only way i could get the k2 editing popup working properly was to uncomment this whole part in the template code, so avoiding to not load mootools .. as all pages have to be editable from the frontend, so assigning all itemid's does not make sense..

not the best solution i guess, but had to get on with it....

site url www.nvrb.nl/nvrb25

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

More
11 years 4 months ago #2522 by admin
Thanks for the feedback.
Although you had to comment the code from the template, you may not have had a choice here.
In order to get that functionality again (the removal of MooTools) in pages that do not require it, you can try the MooTools removal from the jQuery Easy plugin and see if that works for you or if you end up with the same problem.

Olivier.

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