Error message: There was an unexpected problem serving your request

Created on 6 January 2024, 9 months ago
Updated 15 March 2024, 7 months ago

Problem/Motivation
I'm receiving following message after I did a couple of steps.

There was an unexpected problem serving your request
Please try again and contact us if the problem persist including 7fbaf80b-3cda-4ada-b7bd-a5cdd96d9652 in your message.

The long hex number changes everytime I reload the site.

Steps to reproduce
Installation of serials field module.
composer require 'drupal/serial:^2.0@beta'

After this step The website still worked, however when I added a new field with the serial field, I received this message:
Upgrading from 10.0 to 10.1 did not work.

The /update.php does not work because I'm not signed in as admin.
When I was signed in ad admin, the frontpage showed that nothing was needed for the update.

When running drush updatedb I receive following status.

[success] No pending updates.
[error] Drupal\Core\Field\FieldException: Attempted to create an instance of field with name field_client_id on entity type user when the field storage does not exist. in Drupal\field\Entity\FieldConfig->getFieldStorageDefinition() (line 316 of /opt/drupal/web/core/modules/field/src/Entity/FieldConfig.php).

Uninstallingen the serials module does not solve it.

Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States trigdog

    Changing status to Critical as this module seems to have an issue with it's field schema (not sure it is just related to Drupal 10 or not).

    Got this error as well. Running Drupal 10.2 and the 2.0.0-beta2 of this module. Installed on new site I started today. Installed without errors. Adding a serial field to a content type produces the white screen error and the log shows the error mentioned above:

    Drupal\Core\Field\FieldException: Attempted to create an instance of field with name field_client_id on entity type user when the field storage does not exist. in Drupal\field\Entity\FieldConfig->getFieldStorageDefinition() (line 316 of /opt/drupal/web/core/modules/field/src/Entity/FieldConfig.php).

    You cannot access the content type anymore or uninstall the module with this broken field storage but you can remove the broken field using drush.

    Steps to remove field using drush:

    • Export site config: drush cem
    • Find the config name for the broke field in the exported directory on the server. In my case it was: field.field.node.invoice.field_invoice_number
    • run the delete config command (replace my config name with yours): drush config-delete field.field.node.invoice.field_invoice_number
    • Clear cache
  • πŸ‡¬πŸ‡§United Kingdom pivwani

    I have the same issue here. I have found that if you create a content type, add the field with the same name as the problem field and choose text plain, you can then delete the problematic content type and the content type you temporarily created.

    We do need a fix for this though, this only gets you out of the "This website encountered a problem" message.

  • πŸ‡΅πŸ‡±Poland arael3

    Same issue when added a new field with the serial field: "Attempted to create an instance of field with name ... on entity type node when the field storage does not exist.".

  • πŸ‡ΊπŸ‡ΈUnited States duckydan

    I am hitting this same issue:

    Drupal\Core\Field\FieldException: Attempted to create an instance of field with name field_share_code on entity type node when the field storage does not exist. in Drupal\field\Entity\FieldConfig->getFieldStorageDefinition() (line 316 of /var/www/html/beta.weavercafe/web/core/modules/field/src/Entity/FieldConfig.php).

  • πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA

    I'm having the same issue. I spent a couple of hours trying to figure out what the issue is - my main takeaway is that I do not understand why this module has its own storage interface class (src/SerialStorageInterface.php).

    Anyone have the answer to this?

    -mike

  • Merge request !6Resolve #3412857 "Error message there" β†’ (Merged) created by ultimike
  • Status changed to Needs review 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA

    I think I tracked down the culprit - an unnecessary $field->save() in this module's implementation of hook_ENTITY_TYPE_create().

    I've created a merge request.

    I did some manual testing on my local and it seems that (at least) the core functionality of the module is working for me. I haven't pushed it very hard though...

    Functional tests are also passing on my local.

    -mike

  • πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA

    Ah rats - I forked the wrong branch. Stand by...

    -mike

  • Status changed to RTBC 7 months ago
  • πŸ‡¬πŸ‡§United Kingdom intrafusion Edinburgh, UK

    Same problem and MR fixes it

  • First commit to issue fork.
  • Status changed to Needs review 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    I am updating the category: this issue is a bug report, not a support request.

    I agree that the priority is Critical. Perhaps the current version will work on a site that is upgrading from an earlier version, and already has one or more serial field. But if a site adds this module and tries to create a serial field, it will not work.

    I vote +1 for the fix in the MR. I am updating the MR with a test-only change, so I am setting the status back to NR.

    My change is to use the admin UI instead of the API to add a field in the functional test. When I exercise the test locally, it passes. If I revert the fix, then it fails. I am a little surprised that it fails with a different error message:

    Drupal\Core\Entity\EntityStorageException: 'field_config' entity with ID 'entity_test.entity_test.field_serial' already exists. in Drupal\Core\Entity\EntityStorageBase->doPreSave() (line 519 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).

    For reference, here are the top few lines of the stack trace:

    Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 257)
    Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 354)
    Drupal\Core\Entity\EntityBase->save() (Line: 609)
    Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 42)
    serial_field_config_create(Object)
    

    FWIW, it is not clear that the problem described in the issue summary is the same as the one discussed in Comment #2 and following.

  • Status changed to RTBC 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States pwolanin

    Gave this a quick review - seems like a fine test change to back to RTBC

  • Pipeline finished with Skipped
    7 months ago
    #107549
  • Status changed to Fixed 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    Now that I have enabled GitLab CI testing for this project ( πŸ“Œ Enable testing with GitLab CI Fixed ) the tests showed a couple of problems, so I added some small commits to fix them.

    Thanks to everyone who commented on this issue. The original report, the clarification of the issue, the "works for me" comments, and of course the fix in the MR all contributed to getting this issue done.

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

Production build 0.71.5 2024