? ? ? Success

User tests: Successful: Unsuccessful:

avatar Quy
Quy
20 Mar 2017

Summary of Changes

The post-installation message is wrapped in a <p> element. When the message has block elements, it generates invalid HTML markup.

Testing Instructions

Go to Components > Post-installation Messages
View page source
Find:


				<p class="small">
					Since version 3.5.0				</p>
				<p><p>Since Joomla! 3.5 a statistics plugin will submit anonymous data to the Joomla Project. This will only submit the Joomla version, PHP version, database engine and version, and server operating system.</p><p>This data is collected to ensure that future versions of Joomla can take advantage of the latest database and PHP features without affecting significant numbers of users. The need for this became clear when a minimum of PHP 5.3.10 was required when Joomla! 3.3 implemented the more secure Bcrypt passwords.</p><p>In the interest of full transparency and to help developers <a href="https://developer.joomla.org/about/stats.html">this data is publicly available.</a> An API and graphs will show the Joomla version, PHP versions and database engines in use.<br><br>If you do not wish to provide the Joomla Project with this information you can disable the plugin called System - Joomla Statistics.</p></p>
				<div>
															<a href="index.php?option=com_postinstall&amp;view=message&amp;task=unpublish&amp;id=3&amp;bb8fbd385e4c3cce23b936c5fa28591d=1" class="btn btn-inverse btn-small">
						Hide this message					</a>
									</div>

Expected result

				<p class="small">
					Since version 3.5.0				</p>
				<div>
					<p>Since Joomla! 3.5 a statistics plugin will submit anonymous data to the Joomla Project. This will only submit the Joomla version, PHP version, database engine and version, and server operating system.</p><p>This data is collected to ensure that future versions of Joomla can take advantage of the latest database and PHP features without affecting significant numbers of users. The need for this became clear when a minimum of PHP 5.3.10 was required when Joomla! 3.3 implemented the more secure Bcrypt passwords.</p><p>In the interest of full transparency and to help developers <a href="https://developer.joomla.org/about/stats.html">this data is publicly available.</a> An API and graphs will show the Joomla version, PHP versions and database engines in use.</p><p>If you do not wish to provide the Joomla Project with this information you can disable the plugin called System - Joomla Statistics.</p>															<a href="index.php?option=com_postinstall&amp;view=message&amp;task=unpublish&amp;id=3&amp;bb8fbd385e4c3cce23b936c5fa28591d=1" class="btn btn-inverse btn-small">
						Hide this message					</a>
									</div>
avatar Quy Quy - open - 20 Mar 2017
avatar Quy Quy - change - 20 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Mar 2017
Category Administration com_postinstall
avatar Quy Quy - change - 20 Mar 2017
The description was changed
avatar Quy Quy - edited - 20 Mar 2017
avatar Quy Quy - change - 20 Mar 2017
The description was changed
avatar Quy Quy - edited - 20 Mar 2017
avatar Quy Quy - change - 20 Mar 2017
The description was changed
avatar Quy Quy - edited - 20 Mar 2017
avatar Quy Quy - change - 20 Mar 2017
The description was changed
avatar Quy Quy - edited - 20 Mar 2017
avatar franz-wohlkoenig franz-wohlkoenig - test_item - 20 Mar 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 Mar 2017

I have tested this item successfully on c1833e4


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

avatar brianteeman
brianteeman - comment - 20 Mar 2017

Pretty sure this is not the correct fix although you do correctly identify an issue

The issue you identified is coming the language string COM_CPANEL_WELCOME_BEGINNERS_MESSAGE

COM_CPANEL_WELCOME_BEGINNERS_MESSAGE="<p>Community resources are available for new users</p><ul><li><a href="_QQ_"https://docs.joomla.org/Portal:Beginners"_QQ_">Joomla! Beginners Guide</a></li><li><a href="_QQ_"https://forum.joomla.org/viewforum.php?f=706"_QQ_">New to Joomla! Forum</a></li></ul>"

@C-Lodder any thoughts?

avatar Quy
Quy - comment - 20 Mar 2017

There is also the <ul> element which would make it invalid inside the <p> element.

avatar brianteeman
brianteeman - comment - 20 Mar 2017

We really must stop putting markup inside strings :(

avatar C-Lodder
C-Lodder - comment - 20 Mar 2017

There's no point in using a <div> tag. Both <div> and <p> are block elements, and neither need to be wrapped in one another.

So replace:

<div><?php echo JText::_($item->description_key); ?></div>

with:

<?php echo JText::_($item->description_key); ?>

or there is an opening <div> just below, so it could go inside there. Take your pick.

avatar Quy Quy - change - 20 Mar 2017
Labels Added: ?
avatar brianteeman
brianteeman - comment - 20 Mar 2017

That won't work as now you have other messages without any block element

avatar C-Lodder
C-Lodder - comment - 20 Mar 2017

You're saying some language packs have translated this without the HTML markup?

avatar brianteeman
brianteeman - comment - 20 Mar 2017

That is possible but no thats not what I meant. If you look at the other post installation messages you will see that they are not wrapped in a block element so this change to remove the enclosing element from the code will cause invalid markup elsewhere. The problem is using markup in this string. Not in the code this PR edits

COM_CPANEL_MSG_ROBOTS_BODY="A change to the default robots.txt files was made in Joomla! 3.3 to allow Google to access templates and media files by default to improve SEO. This change is not applied automatically on upgrades and users are recommended to review the changes in the robots.txt.dist file and implement these changes in their own robots.txt file."
COM_CPANEL_MSG_STATS_COLLECTION_BODY="Since Joomla! 3.5 a statistics plugin will submit anonymous data to the Joomla Project. This will only submit the Joomla version, PHP version, database engine and version, and server operating system.<br><br>This data is collected to ensure that future versions of Joomla can take advantage of the latest database and PHP features without affecting significant numbers of users. The need for this became clear when a minimum of PHP 5.3.10 was required when Joomla! 3.3 implemented the more secure Bcrypt passwords.<br><br>In the interest of full transparency and to help developers <a href="_QQ_"https://developer.joomla.org/about/stats.html"_QQ_">this data is publicly available.</a> An API and graphs will show the Joomla version, PHP versions and database engines in use.<br><br>If you do not wish to provide the Joomla Project with this information you can disable the plugin called System - Joomla Statistics."

avatar C-Lodder
C-Lodder - comment - 21 Mar 2017

Hmm ok. Well you can wrap it in the <div> but they don't have any default styling unlike <p>, so as a temporary fix, you may want to add a class to the <div> and style the text appropriately.

Or remove the HTML markup from the language string

Or go a dirty route and use PHP to remove the <p> tags from the language string if they exist.

Personally I'd prefer option 2, but not sure if editing the language string like that will be allowed for a minor release.

avatar brianteeman
brianteeman - comment - 21 Mar 2017

We can change the string to remove the p and to replace the li with br - then it will validate etc

thats not a problem to do. Translators will moan that its a useless change but cant do anything about that.

avatar C-Lodder
C-Lodder - comment - 21 Mar 2017

ah fair enough.

@Quy - could you do that please and then be sure to add the <p> tags inside the PHP file?

avatar Quy
Quy - comment - 21 Mar 2017

So replace the unordered list with line breaks? Should each list item be prefixed * or - or nothing?

avatar brianteeman
brianteeman - comment - 21 Mar 2017

Your choice. See what looks best

avatar Quy
Quy - comment - 21 Mar 2017

In the 1st message, it uses <br>. In the Two Factor... message, it uses <br />. Is there a preference on which format?

avatar C-Lodder
C-Lodder - comment - 21 Mar 2017

Please use <br>. I've already remove ALL void tags on Joomla 4 and I don't want anymore going in when it gets merged :)

avatar brianteeman
brianteeman - comment - 21 Mar 2017

Pretty sure that it should be without / as it should be html5

avatar C-Lodder
C-Lodder - comment - 21 Mar 2017

Yup, but half of J3 is still XHTML

avatar joomla-cms-bot joomla-cms-bot - change - 8 Jun 2017
Category Administration com_postinstall Administration Language & Strings
avatar Quy Quy - change - 8 Jun 2017
Labels Added: ?
avatar Quy
Quy - comment - 8 Jun 2017

@brianteeman @C-Lodder Thanks for the tips. Ready for testing.

avatar Quy Quy - change - 8 Jun 2017
The description was changed
avatar Quy Quy - edited - 8 Jun 2017
avatar Quy Quy - change - 8 Jun 2017
The description was changed
avatar Quy Quy - edited - 8 Jun 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jun 2017

I have tested this item successfully on 8702edb


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 8 Jun 2017 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 8 Jun 2017

IMHO each post install message should be wrapped inside a div, not a p that way you could have block level HTML tags inside a post install message (ul, ol, table, h[1-6], etc) - is more flexible that way.
Notice the same logic applies to the message container. Example:

<div class="alert-message">Database table structure is up to date.</div>
avatar Quy
Quy - comment - 8 Jun 2017
avatar andrepereiradasilva
andrepereiradasilva - comment - 8 Jun 2017

@Quy i saw it but don't agree ?

avatar Quy
Quy - comment - 8 Jun 2017

I agree with you too. I noticed the following in that comment so I will rework it later today.

or there is an opening <div> just below, so it could go inside there. Take your pick.

avatar joomla-cms-bot joomla-cms-bot - change - 15 Jun 2017
Category Administration Language & Strings Administration com_postinstall Language & Strings
avatar Quy
Quy - comment - 15 Jun 2017

Ready to be tested. Thanks.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 16 Jun 2017

@Quy can you please update Test Instructions in first Comment?

avatar Quy Quy - change - 16 Jun 2017
The description was changed
avatar Quy Quy - edited - 16 Jun 2017
avatar Quy
Quy - comment - 16 Jun 2017

Instructions are the same except the markup is different.

avatar korneliusz401 korneliusz401 - test_item - 13 Aug 2017 - Tested successfully
avatar korneliusz401
korneliusz401 - comment - 13 Aug 2017

I have tested this item successfully on f05b6f8


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 14 Aug 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Aug 2017

I have tested this item successfully on f05b6f8


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 14 Aug 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Aug 2017

RTC after two successful tests.

avatar mbabker mbabker - change - 14 Aug 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-08-14 11:34:37
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 14 Aug 2017
avatar mbabker mbabker - merge - 14 Aug 2017

Add a Comment

Login with GitHub to post a comment