User tests: Successful: Unsuccessful:
Closes #29998
The problem this resolves is the generating of links for iframes that start with a relative path eg src="index.php.....
when the url you are on might be /index.php/this/that/
This then generates a url of /index.php/this/that/index.php.....
when launched.
Admin modals are unaffected as they are always in the directory /administrator/ and therefore relatively a url starting href="index.php" would load from /administrator/
#29998 has some examples I struggled with today.
This PR fixes two frontend modals - the Versions button when editing content and the SELECT button when selecting a new site logo in Template settings.
Install Joomal 4.0-dev @ 1f24603
Login to super admin
Click Install next to Blog Sample Data
Click ok in JS popup
Go to front end and
Login as super admin
click Welcome to your blog
Click cog -> click edit (to edit the article)
INSPECT the DIV before the Versions button
another good example this fixes is #29296
Note the url in the html
data-url="index.php?option=com_contenthistory&view=history&layout=modal&tmpl=component&field=jform_contenthistory&item_id=com_content.article.3&108a0c70130a44644e515f55efaca61f=1"
<div id="versionsModal" role="dialog" tabindex="-1" class="joomla-modal modal fade" data-url="index.php?option=com_contenthistory&view=history&layout=modal&tmpl=component&field=jform_contenthistory&item_id=com_content.article.3&108a0c70130a44644e515f55efaca61f=1" data-iframe="<iframe class="iframe" src="index.php?option=com_contenthistory&amp;view=history&amp;layout=modal&amp;tmpl=component&amp;field=jform_contenthistory&amp;item_id=com_content.article.3&amp;108a0c70130a44644e515f55efaca61f=1" name="Versions" title="Versions" height="100%" width="100%"></iframe>">
<div class="modal-dialog modal-lg jviewport-width80">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Versions</h3>
<button type="button" class="close novalidate" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body jviewport-height60">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-hidden="true">Close</button></div>
</div>
</div>
</div>
Note the url in the html
data-url="/index.php/component/contenthistory?view=history&layout=modal&tmpl=component&field=jform_contenthistory&item_id=com_content.article.3&108a0c70130a44644e515f55efaca61f=1"
<div id="versionsModal" role="dialog" tabindex="-1" class="joomla-modal modal fade" data-url="/index.php/component/contenthistory?view=history&layout=modal&tmpl=component&field=jform_contenthistory&item_id=com_content.article.3&108a0c70130a44644e515f55efaca61f=1" data-iframe="<iframe class="iframe" src="/index.php/component/contenthistory?view=history&amp;layout=modal&amp;tmpl=component&amp;field=jform_contenthistory&amp;item_id=com_content.article.3&amp;108a0c70130a44644e515f55efaca61f=1" name="Versions" title="Versions" height="100%" width="100%"></iframe>">
<div class="modal-dialog modal-lg jviewport-width80">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Versions</h3>
<button type="button" class="close novalidate" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body jviewport-height60">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-hidden="true">Close</button></div>
</div>
</div>
</div>
none
Status | New | ⇒ | Pending |
Category | ⇒ | Layout |
With last nights Nightly build the Versions modal is styled with and without the patch. As I have multi-lingual sample data installed here are my links:
My before
data-url="index.php?option=com_contenthistory&view=history&layout=modal&tmpl=component&field=jform_contenthistory&item_id=com_content.article.6&587c449cfbb9305dd906a3bcbec547da=1"
My after
data-url="/j4beta2/index.php/en/component/contenthistory?view=history&layout=modal&tmpl=component&field=jform_contenthistory&item_id=com_content.article.6&587c449cfbb9305dd906a3bcbec547da=1"
The “after” url is the correct url thus this patch is correct
I have tested this item
Labels |
Added:
?
|
Previous test is still valid because last change was only in a code comment.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-20 20:29:43 |
Closed_By | ⇒ | richard67 | |
Labels |
Added:
?
|
Thanks!
With last nights Nightly build the Versions modal is styled with and without the patch. As I have multi-lingual sample data installed here are my links:
My before
data-url="index.php?option=com_contenthistory&view=history&layout=modal&tmpl=component&field=jform_contenthistory&item_id=com_content.article.6&587c449cfbb9305dd906a3bcbec547da=1"
My after
data-url="/j4beta2/index.php/en/component/contenthistory?view=history&layout=modal&tmpl=component&field=jform_contenthistory&item_id=com_content.article.6&587c449cfbb9305dd906a3bcbec547da=1"
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30007.