The module throws the following exception.

Error: Class 'Drupal\display_fields\Plugin\DefaultFactory' not found in Drupal\display_fields\Plugin\DisplayFieldsPluginManager->createInstance() (display_fields/src/Plugin/DisplayFieldsPluginManager.php line 37)

The error is caused by the src/Plugin/DisplayFieldsPluginManager.php file that is missing the use Drupal\Component\Plugin\Factory\DefaultFactory; line.

Command icon 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

pski created an issue. See original summary.

delta’s picture

Status: Active » Needs review

hi,
can you check the updated branch or last release?
thank you

pski’s picture

Status: Needs review » Needs work

Hi,

Thanks for your work! This error is solved, but now, the following appears during drush updb:

ParseError: syntax error, unexpected ')', expecting ']' in Composer\Autoload\includeFile() (line 306 of /var/www/web/modules/contrib/display_fields/src/Element/EntityFieldSelect.php) #0 phar:///usr/local/bin/drush/.box/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/web/mo...')

It has been fixed on 8.x branch but not on 9.x.

avpaderno’s picture

Category: Support request » Bug report
Priority: Critical » Normal
Status: Needs work » Active
avpaderno’s picture

Version: 8.x-1.x-dev » 9.1.x-dev

Let's fix this on the latest branch, first.

I am checking the namespaces used from the classes and the directories where their files have been placed. I think I found a discrepancy.

avpaderno’s picture

All the classes/interfaces are placed in the right directory and they are using the correct namespace.

The src/Element/EntityFieldSelect.php file doesn't contain any syntax error. They have been fixed.

delta’s picture

Status: Active » Needs review
pski’s picture

Status: Needs review » Active

Hi,

Thanks for these changes.

However, I still have an error in dblog after updating to 9.0.0-beta4:
Error : Class 'Drupal\display_fields\Plugin\DefaultFactory' not found in Drupal\display_fields\Plugin\DisplayFieldsPluginManager->createInstance() (/var/www/web/modules/contrib/display_fields/src/Plugin/DisplayFieldsPluginManager.php ligne 37)

You should add use Drupal\Component\Plugin\Factory\DefaultFactory; in src/Plugin/DisplayFieldsPluginManager.php.

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier’s picture

Status: Active » Needs review

Addressed #8 in issue fork #10, Please review

avpaderno’s picture

Title: DisplayFieldsConfigInterface not found » Error : Class 'Drupal\display_fields\Plugin\DefaultFactory' not found in Drupal\display_fields\Plugin\DisplayFieldsPluginManager->createInstance()
Issue summary: View changes
avpaderno’s picture

Title: Error : Class 'Drupal\display_fields\Plugin\DefaultFactory' not found in Drupal\display_fields\Plugin\DisplayFieldsPluginManager->createInstance() » Error: Class 'Drupal\display_fields\Plugin\DefaultFactory' not found in Drupal\display_fields\Plugin\DisplayFieldsPluginManager->createInstance()
Issue summary: View changes
avpaderno’s picture

Title: Error: Class 'Drupal\display_fields\Plugin\DefaultFactory' not found in Drupal\display_fields\Plugin\DisplayFieldsPluginManager->createInstance() » Class 'Drupal\display_fields\Plugin\DefaultFactory' not found in Drupal\display_fields\Plugin\DisplayFieldsPluginManager->createInstance()

  • apaderno committed b222807 on 9.1.x
    Issue #3293282 by immaculatexavier, apaderno, delta: Class 'Drupal\...

  • apaderno committed 1813662 on 8.x-1.x
    Issue #3293282 by immaculatexavier, apaderno, delta: Class 'Drupal\...
avpaderno’s picture

Status: Needs review » Fixed

This has been fixed in both the branches. Thank you for the report and the issue fork!

delta’s picture

Status: Fixed » Closed (fixed)

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