Just opening up the conversation of porting this module to Drupal 8. Has there been any discussion or thoughts on the approach?
We'd be happy to help out. :-)
We would need to get a planning session for update strategy. With a lot of the page rendering process changed, I am very worried about being able to output Metatags in the ways we expect to do so. As well as make sure to account for the newer D8 technologies like CMI.
As Core is stabilizing a bit more nowadays, I wonder if it makes sense to start the discussion again?
I don't recommend touching this until 8.0-beta1 is release, and I'm personally focusing on D7 for the foreseeable future.
If else anyone wants to work on this I'm happy to assist.
OK great. I might set up a sandbox so we can start playing around with a port in there.
Sandbox created here. https://drupal.org/sandbox/kimpepper/2175287
Let me know if you'd like write access.
Any updates on this?
No. I've not spent any time on this in the last 6 months.
Any objections to using Github for the initial conversion efforts? It's been very useful for porting token and pathauto so far.
I would request this is work is postponed until 8.0-beta1 is out and this module has reached the 1.0 release.
@dave - I think D8 has quite stable API already. Yes, sometimes minor changes are made but I haven't had a problem since december and I'm making a big distribution(and I have a big need for SEO module like this one).
Status for D8 is 3 beta blockers left and Damien said earlier this week that 1.0 might soon be released (pending performance work in https://www.drupal.org/node/2307383 I guess)
It seems reasonable to wait just a big longer. We're talking about 1 month maybe.
Dave mentioned in #8 that it would be useful to pause this until metatag-7.x-1.0 and drupal-8.0-beta1. Would this be an appropriate time to revisit this now that both milestones have been met?
Indeed it would. Anyone want to work on this?
/me raises hand.
Are we happy to do an initial conversion to D8, then do conversions to plugins and config entities as followups?
@kim.pepper: I'd be completely satisfied with that - v1 as a "get it working" port, v2 as a "this is how it should work" cleanup.
Hmm. This is going to be quite tricky.
I had a go at running drupalmoduleupgrader across it to pick up anything automated. Had very limited luck, and ran into some fatals.
I've made attempts at some simple function conversions in the metatag.install and metatag.module files.
Pushing my code up here https://github.com/kimpepper/metatag
Hi @kim.pepper. From the looks of it, the https://www.drupal.org/project/drupalmoduleupgrader module is still moving quickly to resolve a lot of open tickets, so it's possible that improvements coming down the pipeline might address the issues you were hitting in #15.
I'm not ready to dive in yet, but this module is on my wishlist as I'm starting to explore Drupal 8 a bit more. I'll let you know if it warrants gaining access (or just forking your copy outright).
PS, if it makes it easier:
@DamienMcKenna do you want to use yours as the primary repo to submit pull requests to?
@kim.pepper: You don't have to (it's git after all) but it might make some things easier for you, e.g. keeping up with changes in the D7 codebase.
wish I saw this topic earlier...
@kim.pepper: Have you done any work except for initial commit? Is it result of drupalmoduleupgrader?
I am working for some time on https://www.drupal.org/sandbox/valthebald/2339829, but of course, I'd prefer to join efforts with someone else, if the work is already in progress
FYI just to mention it, I'm expecting to start getting involved in this sometime in January.
@valthebald No, I haven't done much at all.
Happy to work with others around another repo.
@DamienMcKennafirstname.lastname@example.org, I have granted you commit permissions to the sandbox project.
If someone else is going to work on this, it would be probably a good idea to start opening issues, at least for the big tasks (i.e. converting meta tag configuration to D8 configuration entities)
I'll be starting on this in the next week-or-two.
Would anyone be interested in having a hangout / skype chat to discuss this within the next two weeks?
I could in IRC.
IRC or hangout would be cool.
@DamienMcKenna *promoted* this on on Twitter just. I plan to use this module for a Drupal 8 project I'm about to startup now.
Will there be a need for supporting direct upgrading from a D7 site, or is that being easier to make now using Migrate in core?
I'm interested too. For me is better IRC too
Hey Damien I am still pretty new to the Drupal 8 format for modules but I have been playing with it a bit. I would be happy to help out in any way I can. Let me know when you want to have the IRC and I will check it out. :)
As I see there are 2 repos for porting of the metatag module to Drupal 8:
And https://github.com/damienmckenna/metatag as well.
Which one will be used for development now?
P.S: irc +1
FYI what I uploaded to github is a mirror of the main repo, and I also have one on bitbucket: https://bitbucket.org/DamienMcKenna/metatag
Please select one of the times on the following event invite:
So far it seems that either Monday the 16th or Tuesday the 17th between noon and 2pm EST (5pm to 7pm GMT) would work for more people than the other times, the difference currently comes down to whether valthebald or mikey_p could make it. I'll follow up tomorrow and will make a decision then.
FYI I've changed the time options to only include when Dave Reid was available, please review the times and update your selection as appropriate. Thank you.
I can make it both on 16th and 17th on suggested hours (will update doodle now)
Ok, thank you all for letting me know when would work best for you. Based on the submissions I've picked this coming Monday, February 16th between noon and 2pm EST, i.e. between 5pm and 7pm GMT; you can download an icalendar file to add it to your calendar.
Lets plan to meet in the #drupal-seo channel on Freenode IRC.
I discovered that when drupal_set_title() was removed it was no longer possible to arbitrarily set the page title from a page a module does not control; we'll need to resolve #2121123: Introduce Drupal::formatTitle() as a replacement for drupal_set_title.
Another one: hook_page_build() was removed so we'll have to use either hook_page_attachments() or hook_page_attachments_alter(). Hopefully.
hook_page_attachments() should work fine for everything that uses #attached, yes, that's the only thing it can do. (and yes, html_head elements can be added through that, although the API is a bit strange)
FYI I've made a rough alpha-grade copy available:
It doesn't do much, and there are a few todo items that we'll be dealing with early next week to fix some items, but it's a step in the right direction. Right now it *only* supports entities, check the README.txt file for the full todo list.
The D8 codebase is now able to output the page title, and has a number of other improvements since last week. Please feel free to poke it with a stick.
The only thing I was able to do was attach the field. I couldn't finish configuring it because if yo uvisit the field settings page the browser will abort the request. The same goes for displaying an entity form with attached field. Seems like issue with plugin implementation/invokation.
@ivanjaros: I wasn't able to replicate that problem using 8.0.0-beta9.
I have the same problem with following error in the log
PHP Fatal error: Class 'Drupal\\metatag\\Plugin\\metatag\\Tag\\MetaNameBase' not found in /var/www/docroot/modules/metatag_d8/src/Plugin/metatag/Tag/Title.php on line 25
Changing the name MetaTagBase in MetaNameBase.php to MetaNameBase fixes this issue.
Which repo is the main one to fork and do PR for?
I used Drupal 8-beta.9 and https://bitbucket.org/DamienMcKenna/metatag_d8
Apologies, there were some changes I had forgotten to upload to that repo. Please grab the latest and it should work.
Is there any JSON serialization of the metatag values?
@vincic: Not currently.
This commit https://bitbucket.org/sashav/metatag_d8/commits/e037624517aa111242f9f864... lets the tags be serialized to JSON.
This works as quick hack but I am not sure if I am on the right track. Didn't find any good documentation or examples how it should be.
FYI I've uploaded some changes that fix two problems - Google+'s namespaces was throwing an error, and it was stomping all over any other module that needed to add page attachments.
With Drupal 8 Beta 11 I get
PHP Fatal error: Cannot access protected property Drupal\\field\\Entity\\FieldConfig::$field_name in /var/www/docroot/modules/metatag/src/MetatagManager.php on line 236
Anyone working on this?
I have a fix in https://bitbucket.org/DamienMcKenna/metatag_d8/pull-request/2/use-method...
Small fix to ensure Matatags are only applied for objects implementin ContentEntityInterface.
Solves problems with adding a Solr server.
Any feedback on the PR I have made?
I know that developing is easier on GitHub or Bitbucket but can someone please put the dev version in here too so more people can test it as dev module?
Drupal is a registered trademark of Dries Buytaert.