Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Some work has been done already on the D9 compatibility of this module. But there was one part left over. The services.yml file is still injecting @entity.manager, which is deprecated for @entity_type.manager. Funnily enough the actual service in src/ has the correct interface there.
Attaching a patch to resolve this.
Comment | File | Size | Author |
---|---|---|---|
#7 | D9-compatibility_3172331.patch | 1.93 KB | Mikell |
#2 | d9-compatibility_3172331.patch | 307 bytes | DanielVeza |
Issue fork title-3172331
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
DanielVezaComment #3
Deg CreditAttribution: Deg at GSATi commentedWorked for me! 👍
Comment #4
Greg BoggsWhen I save a content type edit screen, I get this error:
Error: Call to undefined method Drupal\Core\Entity\EntityTypeManager::getViewModes() in Drupal\title\BundleConfigManager->getViewModeIds() (line 148 of modules/contrib/title/src/BundleConfigManager.php).
I'll see if I can fix it tomorrow.
Comment #5
Greg BoggsComment #6
DanielVezaAh that function moved to the Entity Repository service not Entity Type Manager. We just need to put the right service in
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
Comment #7
Mikell CreditAttribution: Mikell at Dropsolid for TVH commentedadded service entity_display.repository
Comment #8
Greg BoggsThanks Mikell! I'll give it a test shortly.
~G
Comment #10
Greg BoggsThe merge request is now super close. Everything works except that the label on the title field does not display even when it's set.
Comment #11
Greg BoggsWhile we are stuck on this D9 version, maybe the answer is to end the Title module and direct everyone to:
https://www.drupal.org/project/manage_display
Comment #12
HongPong CreditAttribution: HongPong as a volunteer and at Feidt Design commentedI appear to be catching "Trait 'Drupal\Core\Routing\LinkGeneratorTrait' not found"
"in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Link instead."
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Link.php/...
at /title/src/Plugin/Field/FieldFormatter/LinkedAndWrapped.php:22
The file has
use Drupal\Core\Routing\LinkGeneratorTrait;
and
use LinkGeneratorTrait;
on line 24.
Related line in viewElements is :
$text = $this->l($text, $parent->toUrl());
I succeeded in fixing it, I think with:
adding at top:
use Drupal\Core\Link;
and this:
$text = new Link($text, $parent->toUrl());
Apologies if this is noted somewhere else - it is quite late over here but, I think I am in the clear now! Sorry I need to take off - otherwise i would reroll a patch with these lines as they seem to be critical showstoppers.
Comment #13
Greg BoggsThis module replaces all the features of title and more, and has excellent D9 code already:
https://www.drupal.org/project/manage_display