I have tried to create a feed import where I can import document files directly into Drupal. When choosing a node one can then choose the content type, when choosing media in the processor one can then choose the media type. When choosing file in the processor, the next drop down does not allow one to choose a file type.

I have some very large files to import between 500MB and 5GB, the normal node import would throw an Ajax error when importing so I thought I would try import files directly

Create a new feed type, choose File in the processor and the error is immediately logged.
error text
TypeError: class_implements(): Argument #1 ($object_or_class) must be of type object|string, null given in class_implements() (line 299 of /var/www/html/preview/preview6/web/modules/contrib/feeds/src/Feeds/Processor/Form/DefaultEntityProcessorForm.php)

#0 /var/www/html/preview/preview6/web/modules/contrib/feeds/src/Feeds/Processor/Form/DefaultEntityProcessorForm.php(299): class_implements()
#1 /var/www/html/preview/preview6/web/modules/contrib/feeds/src/Feeds/Processor/Form/DefaultEntityProcessorForm.php(261): Drupal\feeds\Feeds\Processor\Form\DefaultEntityProcessorForm->getUpdateNonExistentActions()
#2 /var/www/html/preview/preview6/web/modules/contrib/feeds/src/FeedTypeForm.php(326): Drupal\feeds\Feeds\Processor\Form\DefaultEntityProcessorForm->validateConfigurationForm()
#3 [internal function]: Drupal\feeds\FeedTypeForm->validateForm()
#4 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/Form/FormValidator.php(82): call_user_func_array()
#5 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/Form/FormValidator.php(275): Drupal\Core\Form\FormValidator->executeValidateHandlers()
#6 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/Form/FormValidator.php(118): Drupal\Core\Form\FormValidator->doValidateForm()
#7 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/Form/FormBuilder.php(593): Drupal\Core\Form\FormValidator->validateForm()
#8 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm()
#9 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#10 /var/www/html/preview/preview6/web/core/modules/layout_builder/src/Controller/LayoutBuilderHtmlEntityFormController.php(39): Drupal\Core\Controller\FormController->getContentResult()
#11 [internal function]: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
#12 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#13 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#15 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#16 /var/www/html/preview/preview6/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /var/www/html/preview/preview6/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#18 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#19 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#20 /var/www/html/preview/preview6/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#21 /var/www/html/preview/preview6/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#22 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#23 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#24 /var/www/html/preview/preview6/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#25 /var/www/html/preview/preview6/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#26 /var/www/html/preview/preview6/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#27 {main}

Issue fork feeds-3406792

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

argh911 created an issue. See original summary.

argh911’s picture

Issue summary: View changes
megachriz’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not able to reproduce the error on a clean install of Drupal. I see in the stack trace that Layout Builder is enabled. I also tried to reproduce the error with that module enabled, but I didn't see the error in that case either.

Can you try to reproduce the error on a clean install and then provide the steps to reproduce it? Thus which additional modules to enable, perhaps which config to set, etc.

I also did just commit a fix for an issue that also occurred when selecting a Feeds plugin from a list: #3031019: Undefined Index: allowed_extensions AJAX error when creating feed types.. Perhaps the fix for that fixes this as well. So it would be good to test first if you still experience the error with the latest dev of Feeds first.

tinang’s picture

I got the same message too.

1. Add Feed type
2. Select Processor as FILE

The message "Oops, something went wrong. Check your browser's developer console for more details." was displayed.
If continue to set up by "Save and add mappings", only "The website encountered an unexpected error. Please try again later." was displayed in a blank page.

In the Recent Log Messages, two entries was found.

Message 1
Warning: Undefined array key "class" in Drupal\feeds\Feeds\Processor\Form\DefaultEntityProcessorForm->getUpdateNonExistentActions() (line 299 of /modules/contrib/feeds/src/Feeds/Processor/Form/DefaultEntityProcessorForm.php)

Message 2
TypeError: class_implements(): Argument #1 ($object_or_class) must be of type object|string, null given in class_implements() (line 299 of /modules/contrib/feeds/src/Feeds/Processor/Form/DefaultEntityProcessorForm.php).

Use F12 to check the browser console, other 2 error messages were found.

Error 1
Failed to load resource: the server responded with a status of 500 (500 Service unavailable (with message))

[{"command":"insert","method":"prepend","selector":null,"data":"\u003Cdiv data-drupal-messages\u003E\n \u003Cdiv role=\u0022contentinfo\u0022 aria-label=\u0022Error message\u0022 class=\u0022messages messages--error\u0022\u003E\n \u003Cdiv role=\u0022alert\u0022\u003E\n \u003Ch2 class=\u0022visually-hidden\u0022\u003EError message\u003C\/h2\u003E\n An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (1 GB) that this server supports.\n \u003C\/div\u003E\n \u003C\/div\u003E\n \u003C\/div\u003E\n","settings":null}]

Error 2
Uncaught
Drupal.AjaxError message : "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 500\nDebugging information follows.\nPath: //admin/structure/feeds/add?ajax_form=1\nStatusText: 500 Service unavailable (with message)\nResponseText: The website encountered an unexpected error. Please try again later."
name : "AjaxError"

All are processors are fine except FILE. I am starting Drupal 10.0.7 and updated to 10.2.4. Feeds Version: 8.x-3.0-beta4. PHP 8.1 / 8.2
Feeds import usually used to data migration. Most of us installed it either the completion of site set up instead of with clean Drupal.
Any method could be trouble shoot easily?

megachriz’s picture

Status: Postponed (maintainer needs more info) » Active

I encountered this issue today. Looks like to be a bug in the File Entity module. The definition of a certain action is malformed.
See also #3471653: Invalid permission "Update file alias"

But I think that Feeds should check for malformed action definitions instead of just assuming that it is correctly defined.

megachriz’s picture

Status: Active » Needs review

I expect that the MR fixes the issue.

megachriz’s picture

Status: Needs review » Fixed

I've scheduled the merge.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • megachriz committed a7ff4f7f on 8.x-3.x
    Issue #3406792 by megachriz: Fixed feed type form failure when a...

Status: Fixed » Closed (fixed)

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