Missing RegistrationLinkFormatter

Created on 24 May 2025, 13 days ago

I tried updating to the latest version of this module.

Unfortunately after update I get the error
Error: Class "Drupal\commerce_registration\Plugin\Field\FieldFormatter\RegistrationLinkFormatter" not found in include()

This is because of the last commit https://git.drupalcode.org/project/commerce_registration/-/commit/f0fc5c...

I don't really understand why that file is deleted, since the test file is still in the repository, but anyways it causes a 500 error on existing sites.

πŸ› Bug report
Status

Active

Version

3.4

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary nagy.balint

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @nagy.balint
  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    The class is no longer needed due to enhancements in the core registration module. Make sure you updated that module in tandem. I kept the test file as it exercises the link formatter in ways that only commerce registration can, so it is worth keeping. I do see that I need to update the comment in that test file, which I will take care of.

    As far as the error goes, clear cache and it should go away. If that doesn't do it, I'll need the name of the include file or a full trace, you should be able to get that from the logs. Tests are passing so it is unlikely anything other than the comment in the test file needs changing, but we will see.

  • πŸ‡­πŸ‡ΊHungary nagy.balint

    Thank you for the quick reply!

    Unfortunately cache clear did not help, but I will have time to check tomorrow, to see what more information I can provide.

  • πŸ‡­πŸ‡ΊHungary nagy.balint

    Thank you again,

    It seems the issue is that this site I took over actually extended this plugin.

    I will see if I can add back the plugin in custom code.

  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    Ah, I was afraid of that. I wonder if you can change the extending class to inherit from the link formatter in registration core. If you need any assistance please feel free to ping me directly through my Drupal.org contact form.

  • πŸ‡ΊπŸ‡ΈUnited States john.oltman

    There is also a case to be made that I should have deprecated the two formatter classes I removed but kept them there as null classes - meaning they simply extend the core registration formatters with no overrides - so as to avoid the issue you are running into. Let's see how your rewrite goes. For now I will reopen the issue in case I decide to add the classes back.

Production build 0.71.5 2024