Problem/Motivation

In #2951965: PHP 5.6: Fatal error during import: FormattableMarkup::__toString() must not throw an exception we are trying to solve an issue of preventing a fatal error from happening when a validation error occurs. When validation fails, Feeds currently throws a \Drupal\feeds\Exception\ValidationException. It passes the exception message to a FormattableMarkup instance, because else the failure string is sanitized twice, which makes errors render like this:

Proposed resolution

Add test coverage for rendering an error caused by a ValidationException, so we can continue our work in the other issue.

Patch is coming.

Comments

MegaChriz created an issue. See original summary.

megachriz’s picture

Status: Active » Needs review
StatusFileSize
new2.47 KB

Status: Needs review » Needs work

The last submitted patch, 2: feeds-field-validation-test-2966515-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

megachriz’s picture

Status: Needs work » Needs review
StatusFileSize
new4.03 KB

Removing the StringTargetTest. Test coverage for display error messages seems more important to me.

  • MegaChriz committed ae66c57 on 8.x-3.x
    Issue #2966515 by MegaChriz: Added test coverage for display a field...
megachriz’s picture

Status: Needs review » Fixed

Committed #4.

Status: Fixed » Closed (fixed)

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