? Success
Pull Request for # 10671

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
30 May 2016

Pull Request for Issue #10671.

Summary of Changes

Allow to add other attributes in JDocument::setMetadata and retrieve them with JDocument::getMetadata.

Testing Instructions

  • Code review
  • Add this code in protostar template index.php
$doc->setMetaData('generator', 'test generator');
$doc->setMetaData('description', 'test description');
$doc->setMetaData('test 1', 'test 1 value');
$doc->setMetaData('test 2', 'test 2 value', true);
$doc->setMetaData('test 3', 'test 3 value', 'property');
$doc->setMetaData('og:image', 'https://cdn.joomla.org/images/Joomla_logo.png', 'property');
  • Now test before and after patch

Before patch

  <meta http-equiv="test 2" content="test 2 value" />
  <meta http-equiv="test 3" content="test 3 value" />
  <meta http-equiv="og:image" content="https://cdn.joomla.org/images/Joomla_logo.png" />
  <meta name="test 1" content="test 1 value" />
  <meta name="description" content="test description" />
  <meta name="generator" content="test generator" />

After patch

  <meta http-equiv="test 2" content="test 2 value" />
  <meta name="test 1" content="test 1 value" />
  <meta property="test 3" content="test 3 value" />
  <meta property="og:image" content="https://cdn.joomla.org/images/Joomla_logo.png" />
  <meta name="description" content="test description" />
  <meta name="generator" content="test generator" />

B/C

Since _metaTags is public and don't exactly know the history on this, i'm not sure if this is B/C.
So please confirm.

avatar andrepereiradasilva andrepereiradasilva - open - 30 May 2016
avatar andrepereiradasilva andrepereiradasilva - change - 30 May 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 May 2016
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - change - 30 May 2016
The description was changed
bcb557f 30 May 2016 avatar andrepereiradasilva cs
avatar andrepereiradasilva andrepereiradasilva - change - 30 May 2016
Title
[JDocument] Allow other attibutes in meta tags
[JDocument] Allow other attributes in meta tags
avatar andrepereiradasilva andrepereiradasilva - change - 30 May 2016
Title
[JDocument] Allow other attibutes in meta tags
[JDocument] Allow other attributes in meta tags
avatar n9iels n9iels - test_item - 30 May 2016 - Tested successfully
avatar n9iels
n9iels - comment - 30 May 2016

I have tested this item successfully on 5f5b5ed

Works fine, thanks!


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

avatar brianteeman brianteeman - change - 31 May 2016
Rel_Number 0 10671
Relation Type Pull Request for
avatar brianteeman brianteeman - change - 31 May 2016
Category Libraries
avatar 810 810 - test_item - 31 May 2016 - Tested successfully
avatar 810
810 - comment - 31 May 2016

I have tested this item successfully on 5f5b5ed


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

avatar 810
810 - comment - 31 May 2016

@andrepereiradasilva if you can also add the: addHtmlNameSpace

Its needed, else the browser plugins can't found the correct meta

avatar mbabker
mbabker - comment - 31 May 2016

That one's not as easy as the <html> tag isn't generated in an API. So you'd need a plugin to add stuff to that onAfterRender. JDocument can have the API to add that stuff, it's just a little trickier to get it to render.

avatar andrepereiradasilva
andrepereiradasilva - comment - 31 May 2016

@mbabker do you see any B/C issues here? I'm not sure ...

avatar mbabker
mbabker - comment - 31 May 2016

If someone's directly manipulating that array perhaps yes. But there's really no other way to make changes without introducing new API and deprecating the existing stuff and I honestly don't see the benefit in that either.

avatar andrepereiradasilva
andrepereiradasilva - comment - 31 May 2016

ok thanks.
I leave that decision to the maintainers.

avatar brianteeman brianteeman - change - 2 Jun 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 2 Jun 2016

RTC based on tests


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

avatar joomla-cms-bot joomla-cms-bot - change - 2 Jun 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 2 Jun 2016
Milestone Added:
avatar joomla-cms-bot
joomla-cms-bot - comment - 2 Jun 2016

This PR has received new commits.

CC: @810, @n9iels


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

avatar roland-d roland-d - change - 4 Jun 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-06-04 10:09:20
Closed_By roland-d
avatar roland-d roland-d - close - 4 Jun 2016
avatar roland-d roland-d - merge - 4 Jun 2016
avatar joomla-cms-bot joomla-cms-bot - close - 4 Jun 2016
avatar roland-d roland-d - reference | c1beead - 4 Jun 16
avatar roland-d roland-d - merge - 4 Jun 2016
avatar roland-d roland-d - close - 4 Jun 2016
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jun 2016
Labels Removed: ?
avatar roland-d
roland-d - comment - 4 Jun 2016

Thanks everybody

avatar andrepereiradasilva andrepereiradasilva - head_ref_deleted - 4 Jun 2016
avatar AFlorencia
AFlorencia - comment - 8 Jun 2017

This is great peeps! Thank you!

Add a Comment

Login with GitHub to post a comment