? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
5 Jul 2020

Closes #29998

Summary of Changes

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.

Testing Instructions

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

Actual result BEFORE applying this Pull Request

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&amp;view=history&amp;layout=modal&amp;tmpl=component&amp;field=jform_contenthistory&amp;item_id=com_content.article.3&amp;108a0c70130a44644e515f55efaca61f=1" data-iframe="<iframe class=&quot;iframe&quot; src=&quot;index.php?option=com_contenthistory&amp;amp;view=history&amp;amp;layout=modal&amp;amp;tmpl=component&amp;amp;field=jform_contenthistory&amp;amp;item_id=com_content.article.3&amp;amp;108a0c70130a44644e515f55efaca61f=1&quot; name=&quot;Versions&quot; title=&quot;Versions&quot; height=&quot;100%&quot; width=&quot;100%&quot;></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>

Expected result AFTER applying this Pull Request

Note the url in the html

data-url="/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"
<div id="versionsModal" role="dialog" tabindex="-1" class="joomla-modal modal fade" data-url="/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" data-iframe="<iframe class=&quot;iframe&quot; src=&quot;/index.php/component/contenthistory?view=history&amp;amp;layout=modal&amp;amp;tmpl=component&amp;amp;field=jform_contenthistory&amp;amp;item_id=com_content.article.3&amp;amp;108a0c70130a44644e515f55efaca61f=1&quot; name=&quot;Versions&quot; title=&quot;Versions&quot; height=&quot;100%&quot; width=&quot;100%&quot;></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>

Documentation Changes Required

none

avatar PhilETaylor PhilETaylor - change - 5 Jul 2020
Status New Pending
avatar PhilETaylor PhilETaylor - open - 5 Jul 2020
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jul 2020
Category Layout
avatar PhilETaylor PhilETaylor - change - 5 Jul 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 5 Jul 2020
avatar ceford
ceford - comment - 6 Jul 2020

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.

avatar ceford
ceford - comment - 6 Jul 2020

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.

avatar PhilETaylor
PhilETaylor - comment - 6 Jul 2020

The “after” url is the correct url thus this patch is correct

avatar ceford ceford - test_item - 6 Jul 2020 - Tested successfully
avatar ceford
ceford - comment - 6 Jul 2020

I have tested this item successfully on 856b214


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

avatar PhilETaylor
PhilETaylor - comment - 6 Jul 2020

yes another good example this fixes is #29296

avatar PhilETaylor PhilETaylor - change - 8 Jul 2020
Labels Added: ?
avatar PhilETaylor PhilETaylor - change - 8 Jul 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 8 Jul 2020
avatar richard67 richard67 - alter_testresult - 12 Jul 2020 - ceford: Tested successfully
avatar richard67
richard67 - comment - 12 Jul 2020

Previous test is still valid because last change was only in a code comment.

avatar Quy Quy - test_item - 12 Jul 2020 - Tested successfully
avatar Quy
Quy - comment - 12 Jul 2020

I have tested this item successfully on 0cf8eba


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

avatar Quy Quy - change - 12 Jul 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 12 Jul 2020

RTC


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

avatar richard67 richard67 - change - 20 Jul 2020
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: ?
avatar richard67 richard67 - close - 20 Jul 2020
avatar richard67 richard67 - merge - 20 Jul 2020
avatar richard67
richard67 - comment - 20 Jul 2020

Thanks!

Add a Comment

Login with GitHub to post a comment