Closed (outdated)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2010 at 03:26 UTC
Updated:
9 Feb 2026 at 18:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alex_b commentedFirst shot. Issues:
- Invokes hooks even though error may be fatal (this may be OK as if an error on invoke occurs, that error is escalated to PHPs error handler).
- Treats every error as fatal and aborts import/clear.
Comment #2
alex_b commented- Only abort if error is fatal.
- Log where error was caused.
To do:
- There is still a possibility that sources are left in a limbo state if a fatal error occurs. Could be avoided by resetting source state to empty before dispatching import / clear.
- Long error messages are hard to read - break them out into a separate error page that shows details? Would require schema changes.
Comment #3
alex_b commentedAvoid a notice.
Comment #4
alex_b commentedAccidentally had included link patch.
Comment #5
johnbarclay commentedI like this approach to handling entity errors. With the backtrace it gives some good error messaging into a complex part of drupal.
Can the maintainer say if this approach is desireable or the standard try/catch/watchdog approach to error catching. There are a few places in feeds where better error catching could be implemented.
Comment #6
franzI didn't compare line by line, but why is it necessary to have a new function to display last caller instead of Drupal's?
Comment #7
franzComment #8
franzI understand the difference now, but I don't think we need duplicate code to address it. I replaced the duplicated code with _drupal_get_last_caller() which keeps consistency. Also re-rolled.
I haven't tested this, if anyone can review it.
Comment #9
geek-merlin@franz #8:
this patch looks totally reasonable. has to be tested though.
(anyone any idea how to mock those fatal entity create errors for automated tests?)
why do we still have identical error handler methods importError() and clearError()?
Comment #10
twistor commentedCross referencing #1029102: Importing Large CSV document (downloaded and processed in the background).
Comment #11
ari-meetai commentedI think it would be good to add an option on the import settings for the import to stop on errors. In my case importing more than 100,000 combinations.
Comment #12
twistor commentedPutting this on my list.
Comment #13
twistor commentedRe-trying this. Simplified franz's approach a bit. I think the feeds_get_last_caller() was a bit overkill. Also, I just added the error handler to acquireLock() and releaseLock(). There's a nice symmetry there.
I have an idea for testing this.
Comment #14
twistor commentedI suppose the patch would help.
On to the tests.
Comment #15
megachrizThis is probably a related issue: #1953008: PHP Fatal error: Nesting level too deep - recursive dependency? in FeedsProcessor.inc on line 199
Comment #16
twistor commentedGotta resolve this.
I want to explore the deleting on load a bit, but we need to address this in some form.
For the record, I came up with a test for this, but it fails because any kind of fatal error triggers a test failure. Perhaps we can restrict it to run locally only.
Comment #17
twistor commentedComment #18
megachrizPerhaps you can override DrupalTestCase::errorHandler() in the test class. I think this is the method that triggers a test failure upon a fatal error. Or does the test fail to complete, because the error is "fatal"?
Comment #19
bluegeek9 commentedDrupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.
If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.
If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!