?
avatar Chaosxmk
Chaosxmk
8 Feb 2019

Steps to reproduce the issue

  1. Create new article
  2. Select Image in CMS Content context menu to open com_media modal
  3. Open context menu for an image, select edit
  4. Click the cancel button in the toolbar at the top

Expected result

The iframe navigates back to administrator/index.php?option=com_media&tmpl=component&e_name=jform_articletext&asset=com_content

Actual result

The iframe loses the tmpl=component parameter, and the iframe now contains full navigation of the backend.
Modal error

Additional comments

This can be repeated ad infinitum to create modals inside modals inside modals...

avatar Chaosxmk Chaosxmk - open - 8 Feb 2019
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Feb 2019
avatar bahl24
bahl24 - comment - 10 Feb 2019

@Chaosxmk I was able to successfully reproduce the issue and also noticed some other bugs. I have started working on this

avatar bahl24
bahl24 - comment - 11 Feb 2019

@dgrammatiko @puneet0191 @bembelimen
The original url params are-
screenshot from 2019-02-11 20-09-10
which helps to load http://localhost/joomla-cms/administrator/index.php?option=com_media&tmpl=component&e_name=jform_articletext&asset=com_content&author=&path=local-0:/
Notice the absence of styling in this page

  • Open context menu for an image, select edit
  • Click the cancel button in the toolbar at the top

After this the url params become-
screenshot from 2019-02-11 23-18-28
This is because cancel and other buttons redirect back to original page which is diff from tmpl=component . I am confused about how to proceed as it is not a typical bug, imho a get variable may be req to control display of nav toolbar. What are your views?

avatar dgrammatiko
dgrammatiko - comment - 11 Feb 2019

@bahl24 actually it should be quite easy fix:
The media manager has a state store all we need to do is make sure that the data there has also the result of the function isModal() :

isModal() {
return Joomla.getOptions('com_media', {}).isModal;
}

So basically move this function to the API: https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_media/resources/scripts/app/Api.js

Make sure that the data returned from this method gets saved in the store or a cookie or localStorage...

Then adjust the fetch urls to always check for this data and append or not the tmpl=component

avatar dgrammatiko
dgrammatiko - comment - 11 Feb 2019

@bahl24 Ignore my comment. This one I cannot reproduce it

avatar dgrammatiko
dgrammatiko - comment - 11 Feb 2019

@bahl24 there is a PR: #23880 please test it

avatar Quy Quy - change - 11 Feb 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-02-11 19:15:42
Closed_By Quy
avatar joomla-cms-bot joomla-cms-bot - change - 11 Feb 2019
Closed_By Quy joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 11 Feb 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 11 Feb 2019

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23832

Add a Comment

Login with GitHub to post a comment