? ? Pending

User tests: Successful: Unsuccessful:

avatar kernusr
kernusr
8 Jun 2017

Pull Request for Issue # .

Summary of Changes

Changed the type of the parameter $content from a string to an array in the setMetaData method of the JDocument class.
This will allow you to add multiple identical tags with different values. For example og:image (http://ogp.me/#array)

Testing Instructions

Call in your code
JFactory::getDocument()->setMetaData("og:image", array("/image1.jpg", "/image2.jpg", "/image3.jpg"), 'property');

Expected result

View the source of the page in the browser.
You should see the following code in head:
<meta property="og:image" content="/image1.jpg" /> <meta property="og:image" content="/image2.jpg" /> <meta property="og:image" content="/image3.jpg" />

Documentation Changes Required

https://api.joomla.org/cms-3/classes/JDocument.html#method_setMetaData
Replace this:

$content string Value of the meta HTML tag
with this:

$content mixed Value of the meta HTML tag as array or string

avatar kernusr kernusr - open - 8 Jun 2017
avatar kernusr kernusr - change - 8 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jun 2017
Category Libraries
avatar kernusr kernusr - change - 8 Jun 2017
Title
put multiple versions of the same <meta> tag
put multiple versions of the same tag
Labels Added: ?
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jun 2017

@kernusr can you please write the "Summary of Changes" also in English – thanks.

avatar kernusr kernusr - change - 8 Jun 2017
The description was changed
avatar kernusr kernusr - edited - 8 Jun 2017
avatar kernusr
kernusr - comment - 8 Jun 2017

@franz-wohlkoenig oops! Sory

avatar kernusr kernusr - change - 12 Jun 2017
Title
put multiple versions of the same <meta> tag
put multiple versions of the same tag
avatar brianteeman brianteeman - test_item - 22 Jun 2017 - Tested successfully
avatar brianteeman
brianteeman - comment - 22 Jun 2017

I have tested this item successfully on bb096d5


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

avatar Quy Quy - test_item - 22 Jun 2017 - Tested successfully
avatar Quy
Quy - comment - 22 Jun 2017

I have tested this item successfully on 9ba276b


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

avatar Quy
Quy - comment - 22 Jun 2017

@franz-wohlkoenig Please RTC as the last change was to remove tabs which would not affect the test result. Thanks.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Jun 2017
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - edited - 22 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jun 2017
Title
put multiple versions of the same <meta> tag
put multiple versions of the same tag
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Jun 2017

RTC after two successful tests.

avatar zero-24 zero-24 - change - 22 Jun 2017
Milestone Added:
avatar mbabker mbabker - change - 19 Jul 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-07-19 12:15:53
Closed_By mbabker
avatar mbabker mbabker - close - 19 Jul 2017
avatar mbabker mbabker - merge - 19 Jul 2017

Add a Comment

Login with GitHub to post a comment