?
avatar diglin
diglin
16 Sep 2015

Steps to reproduce the issue

Hello,

Joomla has been freshly refreshed to v. 3.4.4, since then I am blocked to get access to some feature while editing a menu item or an article. The display of tabs like "Details", "Type of link" , "Parameters" while editing a menu item is missing and I cannot save the current menu item.

The JS error message is the following:

Uncaught SyntaxError: missing ) after argument list - index.php?option=com_menus&view=item&layout=edit&id=159:132

Here is the piece of code where comes the error:

jQuery(document).ready(function($) {
   $('#modalArticlejform_request_id').on('show', function() {
       $('body').addClass('modal-open');
       var modalBody = $(this).find('.modal-body');
       modalBody.find('iframe').remove();
       modalBody.prepend('<iframe class="iframe" src="index.php?option=com_content&amp;view=articles&amp;layout=modal&amp;tmpl=component&amp;function=jSelectArticle_jform_request_id&amp;a3c6b29f4727e3488165555a0bf92a83=1" name="Sélectionner ou changer l'article" height="300px" width="800px"></iframe>');
   }).on('hide', function () {
       $('body').removeClass('modal-open');
   });
});

The error is due to a bad escape of a quote in the iframe name as I have French locale. Seems that between version 3.4.3 and 3.4.4, the iframe has a name which was not the case before.

As I don't know that well the J! framework I cannot provide a solution but of my point of view, $iframeHtml output should be escaped:

file layouts/joomla/modal/main.php line 68

$iframeHtml = JLayoutHelper::render('joomla.modal.iframe', $displayData);

Expected result

Display the list of tabs with "Details", "Type of link" , "Parameters" while editing a sub menu and be allowed to save the menu item

Actual result

Cannot save, cannot get access to the menu tabs while editing it

System information (as much as possible)

See explanation at the top

Additional comments

See explanation at the top

avatar diglin diglin - open - 16 Sep 2015
avatar diglin
diglin - comment - 16 Sep 2015

I'd like to add that the original file which provides this error is administrator/components/com_content/models/fields/modal/article.php:178


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7897.

avatar dgt41
dgt41 - comment - 16 Sep 2015

Same issue as #7890 and #7880. It has been solved already with #7845

avatar diglin diglin - change - 16 Sep 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-09-16 17:00:34
Closed_By diglin
avatar diglin diglin - close - 16 Sep 2015
avatar diglin diglin - close - 16 Sep 2015
avatar diglin
diglin - comment - 16 Sep 2015

@dgt41 didn't noticed. thanks

avatar tuil
tuil - comment - 19 Feb 2016

I have the solution.
Edit file: \layouts\joomla\modal\iframe.php
Replace: $iframeAttributes['name'] = $params['title']; -> $iframeAttributes['name'] = addslashes($params['title']);

good luck

avatar brianteeman
brianteeman - comment - 19 Feb 2016

As stated above this was already fixed @tuil

Add a Comment

Login with GitHub to post a comment