Skip to content

[config:export:content:type] Error: Class 'SplFileInfo' does not have a method 'serialize' #4006

@FirstSanny

Description

@FirstSanny

Problem/Motivation

When trying to export my config the console runs into an error. That happens for every content type i'm trying to export.

  • Drupal version 8.6.11
  • Console version 1.8.0
  • Console Launcher version 1.8.0
  • other people with the same problem: drupal.org
  • reproduce with any content-type export and the given versions

Errors


 [ERROR] <em class="placeholder">Warning</em>: call_user_func_array() expects parameter 1 to be a valid callback,
         class 'SplFileInfo' does not have a method 'serialize' in <em
         class="placeholder">Drupal\Core\Extension\Extension-&gt;__call()</em> (line <em class="placeholder">160</em>
         of <em class="placeholder">core/lib/Drupal/Core/Extension/Extension.php</em>). <pre
         class="backtrace">Drupal\Core\Extension\Extension-&gt;__call(&#039;serialize&#039;, Array) (Line: 314)
         Drupal\Console\Extension\Manager-&gt;createExtension(Object) (Line: 251)
         Drupal\Console\Extension\Manager-&gt;getModule(&#039;address&#039;) (Line: 86)
         Drupal\Console\Command\Config\ExportContentTypeCommand-&gt;exportConfigToModule(&#039;address&#039;,
         &#039;Exporting content type&#039;) (Line: 183)
         Drupal\Console\Command\Config\ExportContentTypeCommand-&gt;execute(Object, Object) (Line: 255)
         Symfony\Component\Console\Command\Command-&gt;run(Object, Object) (Line: 978)
         Symfony\Component\Console\Application-&gt;doRunCommand(Object, Object, Object) (Line: 255)
         Symfony\Component\Console\Application-&gt;doRun(Object, Object) (Line: 185)
         Drupal\Console\Core\Application-&gt;doRun(Object, Object) (Line: 64)
         Drupal\Console\Application-&gt;doRun(Object, Object) (Line: 148)
         Symfony\Component\Console\Application-&gt;run() (Line: 89)
         require(&#039;/var/app/current/vendor/drupal/console/bin/drupal.php&#039;) (Line: 4)
         </pre>



 [ERROR] <em class="placeholder">Warning</em>: call_user_func_array() expects parameter 1 to be a valid callback,
         class 'SplFileInfo' does not have a method 'unserialize' in <em
         class="placeholder">Drupal\Core\Extension\Extension-&gt;__call()</em> (line <em class="placeholder">160</em>
         of <em class="placeholder">core/lib/Drupal/Core/Extension/Extension.php</em>). <pre
         class="backtrace">Drupal\Core\Extension\Extension-&gt;__call(&#039;unserialize&#039;, Array) (Line: 314)
         Drupal\Console\Extension\Manager-&gt;createExtension(Object) (Line: 251)
         Drupal\Console\Extension\Manager-&gt;getModule(&#039;address&#039;) (Line: 86)
         Drupal\Console\Command\Config\ExportContentTypeCommand-&gt;exportConfigToModule(&#039;address&#039;,
         &#039;Exporting content type&#039;) (Line: 183)
         Drupal\Console\Command\Config\ExportContentTypeCommand-&gt;execute(Object, Object) (Line: 255)
         Symfony\Component\Console\Command\Command-&gt;run(Object, Object) (Line: 978)
         Symfony\Component\Console\Application-&gt;doRunCommand(Object, Object, Object) (Line: 255)
         Symfony\Component\Console\Application-&gt;doRun(Object, Object) (Line: 185)
         Drupal\Console\Core\Application-&gt;doRun(Object, Object) (Line: 64)
         Drupal\Console\Application-&gt;doRun(Object, Object) (Line: 148)
         Symfony\Component\Console\Application-&gt;run() (Line: 89)
         require(&#039;/var/app/current/vendor/drupal/console/bin/drupal.php&#039;) (Line: 4)
         </pre>

Example Log

[ec2-user@ip-123-45-67-890 current]$ drupal config:export:content:type page
 Enter the module name [address]:
 >

 Export content type in module as an optional configuration (yes/no) [yes]:
 > no

 commands.config.export.content.type.questions.remove-uuid (yes/no) [yes]:
 >

 commands.config.export.content.type.questions.remove-config-hash (yes/no) [yes]:
 >

 Exporting content type
 - modules/contrib/address/config/install/node.type.page.yml
 - modules/contrib/address/config/install/field.field.node.page.body.yml
 - modules/contrib/address/config/install/field.storage.node.body.yml
 - modules/contrib/address/config/install/core.entity_form_display.node.page.default.yml
 - modules/contrib/address/config/install/core.entity_view_display.node.page.default.yml
 - modules/contrib/address/config/install/core.entity_view_display.node.page.teaser.yml
 - modules/contrib/address/config/install/core.entity_view_mode.node.teaser.yml

Solutions

Didn't tried something yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions