The "default" form handler of the "encryption_profile" entity type specifies a non-existent class "Drupal\encrypt\Form\EncryptionProfileDefaultForm"

Created on 9 July 2024, 10 months ago
Updated 15 September 2024, 8 months ago

Problem/Motivation

I discovered this error while getting a list of forms for entities with a custom code

Steps to reproduce

Go to the encryption_profile entity definition and you will notice the default form doesn't exist in the module

* "default" = "Drupal\encrypt\Form\EncryptionProfileDefaultForm"

Proposed resolution

Add the form or remove the line.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada adriancid Montreal, Canada

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

Merge Requests

Comments & Activities

  • Issue created by @adriancid
  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    andrew.farquharson β†’ made their first commit to this issue’s fork.

  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    It looks as though there is sufficient test coverage without the need for a new test. The 'encryption_profile' config entity type seems to enable CRUD without the need of the 'default' handler. As @adriancid states, there is no form corresponding with the handler so the handler and this one line of code seems to me to be redundant.

    The example config entity in the 'Examples' project does not have a 'default' handler. It has the same as the remaining handlers in this project e.g. 'add', 'edit' 'delete'. So the Examples module would seem to set a sane baseline that, after this one line deletion, this module will adhere to.

  • Status changed to Needs review 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom oily Greater London
  • Pipeline finished with Success
    8 months ago
    Total: 355s
    #263239
  • Pipeline finished with Success
    8 months ago
    Total: 248s
    #263258
  • Pipeline finished with Success
    8 months ago
    Total: 178s
    #263276
  • Pipeline finished with Success
    8 months ago
    Total: 254s
    #263434
  • Status changed to Needs work 8 months ago
  • πŸ‡―πŸ‡΅Japan ptmkenny

    Phpcs issues are not bugs and have already been fixed in πŸ“Œ Fix phpcs and make passing phpcs mandatory in GitLab CI Needs review . Please limit your fixes to the reported issue. It can be difficult to commit MRs when there are multiple MRs fixing the same issue, particularly if they do so in slightly different ways.

  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    @ptmkenny Ah okay. I have been working on core issues and was told to fix phpcs errors by a maintainer. If that is not the correct approach in this project, do you want me to remove all my phpcs commits from the MR to leave only the one liner deletion that (I hope) closes the issue?

  • πŸ‡―πŸ‡΅Japan ptmkenny

    @andrew.farquharson Yes, please remove all phpcs changes from this MR. A one liner is fine if it fixes the problem described in the issue summary.

    On Drupal.org, generally speaking, issues should only fix what is described in the issue summary and should not include additional fixes for phpcs, phpstan, and so on. If a core maintainer told you to fix the coding standards, I imagine that they meant to fix the phpcs issues in your MR (to avoid committing coding standards violations), not elsewhere in the code. Core is generally quite strict on issue scope.

    There is no need to create a new issue for the phpcs changes because there is already an issue here: πŸ“Œ Fix phpcs and make passing phpcs mandatory in GitLab CI Needs review

  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    @ptmkenny Thank you. That all makes sense. I will look at the phpcs issue, too.

  • Pipeline finished with Success
    8 months ago
    Total: 200s
    #277391
  • Status changed to Needs review 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom oily Greater London
  • Status changed to RTBC 8 months ago
  • πŸ‡―πŸ‡΅Japan ptmkenny

    This fix looks good to me-- as noted in #1 and #3, the form does not exist, so we should remove the reference.

  • Pipeline finished with Canceled
    8 months ago
    Total: 121s
    #278571
  • Pipeline finished with Success
    8 months ago
    Total: 179s
    #278572
  • Status changed to Fixed 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom oily Greater London
  • Pipeline finished with Success
    8 months ago
    Total: 184s
    #278575
  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    @ptmkenny I hope I am getting this right. But it seemed correct (after I read some documentation about contributing on drupal.org) to change the status of this issue to 'fixed'. I also copied and used the commit message from the bottom of this page so as to credit all three persons involved in the fix. The commit was a git --no-update one. As the commit was a requirement of proper contribution but did not involve any code changes.

  • Status changed to RTBC 8 months ago
  • πŸ‡―πŸ‡΅Japan ptmkenny

    @andrew.farquharson After an issue is marked RTBC (Reviewed and tested by the community), then it can be committed, but only a module maintainer can commit to the module repository. So, we have to wait for a maintainer to review the MR and then, if the maintainer approves, commit the MR.

    This is something only the maintainer can do; if anyone could commit to any module, Drupal would quickly be overrun by spam :(

    So, until the maintainer makes a decision, this issue should stay as RTBC.

  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    Hi @ptmkenny. Okay. The guide I read is a bit misleading (I may edit it). I will apply to be a maintainer if the fix takes a long time.

  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States rlhawk Seattle, Washington, United States

    It looks good, thanks!

  • πŸ‡¬πŸ‡§United Kingdom oily Greater London

    @rlhawk Thank you for the commit!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024