Page break error display :The "logo" entity type does not exist

Created on 3 September 2024, 13 days ago
Updated 13 September 2024, 3 days ago

Problem/Motivation

The website encountered an unexpected error. Try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "logo" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 138 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Steps to reproduce

There is an issue occurring when clicking on the entity used for the logo from the file system.

1. Upload a custom logo:
Navigate to Administration > Configuration > User Interface > Navigation > Settings.
Upload and save your custom logo.

2. Save the configuration:
Ensure the changes are saved properly.

3. Verify the issue:
Go to Administration > Content > Files.
Locate your most recently uploaded logo file.
Click on the Usage link for this file , 'll break the page & display above mentioned error.

I didn't found similar issue reported , so if feels it's duplicate, feel free to close it & attach the relevant issue here

Proposed resolution

Remaining tasks

- Analysed the approach to fix solution
- Write test
- Need review

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Closed: duplicate

Version

11.0 ๐Ÿ”ฅ

Component
Navigationย  โ†’

Last updated about 2 hours ago

No maintainer
Created by

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

Merge Requests

Comments & Activities

  • Issue created by @pooja_sharma
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Prashant.c Dharamshala

    Yes, there is an issue with this because the entity type that is being used for this file is logowhich does not exist hence the error.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Prashant.c Dharamshala

    In the core/modules/navigation/src/Form/SettingsForm.phpthe code to add/delete records uses the "logo" as the entity name
    $this->fileUsage->add($new_logo_managed, 'navigation', 'logo', 1);
    $this->fileUsage->delete($previous_logo_managed, 'navigation', 'logo', 1);

    The file usage is a view that requires it to be an entity type /admin/structure/views/view/files/edit/page_2 which is throwing an error.

    Now I am not sure whether this is a bug in the Navigation module or core itself that allows an entity name in File usage that does not even exist.

  • Status changed to Needs review 7 days ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia KumudB Ahmedabad

    I wanted to update regarding the issue we discussed. I pulled the latest code from the 11.x branch, and I was unable to reproduce the issue locally. This behavior was consistent with the problem we encountered previously, so it seems to be resolved with the recent changes.

    For reference, Iโ€™ve attached recording that demonstrate the current state of the application.

    Please let me know if you need any further information or if thereโ€™s anything else I should look into.

  • Assigned to pooja_sharma
  • Status changed to Needs work 6 days ago
  • I have taken the latest pull , however still replicable this issue, attaching the screenshots.

    I tried to upload the navigation custom logo image
    Then click on file menu on the left sidebar this page open, you 'll redirect to this page: admin/content/files
    Click on the Usage link for this file , page break with above mentioned error.

    Tried to debug while calling file usage API(), correct entity type missing that causing error, working on it.

  • Pipeline finished with Canceled
    6 days ago
    Total: 269s
    #278988
  • Pipeline finished with Success
    6 days ago
    Total: 899s
    #278993
  • Pipeline finished with Success
    6 days ago
    Total: 640s
    #279286
  • Pipeline finished with Success
    6 days ago
    Total: 436s
    #279301
  • Issue was unassigned.
  • Status changed to Needs review 6 days ago
  • Tried to address issue & added test coverage with minimal changes in relevant existing test.

    Please review, moving NR.

  • Status changed to Closed: cannot reproduce 6 days ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia KumudB Ahmedabad

    I have closed this issue as I was unable to reproduce it with the latest pull from the 11.x branch. It appears that the issue has been resolved with recent fixes.

    If anyone encounters a similar issue in the future, please feel free to open a new issue.

    Thank you!

  • Status changed to Needs review 6 days ago
  • Status changed to Needs work 5 days ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada SKAUGHT

    have reviewed patch. yes oversight in original name spacing for file usage.

    will also probably need an update hook to check if any update any existing entries to be updated to 'file' (as $new_logo_managed->getEntityTypeId() will equal 'file').

  • Assigned to pooja_sharma
  • Thanks for reviewing it, looking into it.

  • Pipeline finished with Success
    5 days ago
    Total: 813s
    #280842
  • Issue was unassigned.
  • Status changed to Needs review 5 days ago
  • Tried to address the feedback. Please review, moving NR.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain plopesc Valladolid

    Good catch!

    The file usage logic should be gone as part of ๐Ÿ“Œ Store the file path instead of ID for the navigation logo Needs work , so I would prefer to focus on addressing that issue that indirectly would solve this one.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    @plopesc should this continue? Or closed and credit moved over?

  • Status changed to Closed: duplicate 3 days ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada m4olivei Grimsby, ON

    Letโ€™s close this as a duplicate of ๐Ÿ“Œ Store the file path instead of ID for the navigation logo Needs work , and continue efforts there, and also remember to transfer credits. I'll make a note of those who contributed here on the other issue.

Production build 0.71.5 2024