Project

General

Profile

Actions

Bug #98328

open

Exception "Data too long for column url" when checking links

Added by Sybille Peters over 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2022-09-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Presumably, due to the already known parsing problem when parsing links, an exception may get thrown while checking links. This is severe for linkvalidator because the link checking is aborted and worst case a number of links can no longer be checked.

The exception occurs in linkvalidator but the reason for the exception is the link parsing, see #98120 and related issues

Reproduce

1. Insert content of attached file bodytext_content_source.txt into an RTE field for example of CE "Text & Media" (in "source" mode or via a DB INSERT).
2. Run "Check links" in linkvadator Module tab "Check links" function

An Exception should be shown in BE (use Debug mode)

Solution

Workaround

Avoid Links in RTE where the anchor text contains a URL

Exception stack trace

see also file exception_log.txt


(1/3) #1406 Doctrine\DBAL\Exception\DriverException

An exception occurred while executing a query: Data too long for column 'url' at row 1

in /var/www/html/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php line 119

            case 1566:
                return new NotNullConstraintViolationException($exception, $query);
        }

        return new DriverException($exception, $query);
    }
}

at Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(object(Doctrine\DBAL\Driver\Mysqli\Exception\StatementError), object(Doctrine\DBAL\Query))
in /var/www/html/vendor/doctrine/dbal/src/Connection.php line 1814

        if ($this->exceptionConverter === null) {
            $this->exceptionConverter = $this->_driver->getExceptionConverter();
        }

        $exception = $this->exceptionConverter->convert($driverException, $query);

        if ($exception instanceof ConnectionLost) {
            $this->close();
        }

at Doctrine\DBAL\Connection->handleDriverException(object(Doctrine\DBAL\Driver\Mysqli\Exception\StatementError), object(Doctrine\DBAL\Query))
in /var/www/html/vendor/doctrine/dbal/src/Connection.php line 1749

        string $sql,
        array $params = [],
        array $types = []
    ): DriverException {
        return $this->handleDriverException($e, new Query($sql, $params, $types));
    }

    /**
     * @internal

at Doctrine\DBAL\Connection->convertExceptionDuringQuery(object(Doctrine\DBAL\Driver\Mysqli\Exception\StatementError), 'INSERT INTO `tx_linkvalidator_link` (`headline`, `record_pid`, `record_uid`, `table_name`, `link_type`, `link_title`, `field`, `last_check`, `element_type`, `language`, `url`, `url_response`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array(' ....

in /var/www/html/typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php line 169

                // @todo #64091: only select rows that have content in at least one of the relevant fields (via OR)
                while ($row = $result->fetchAssociative()) {
                    $results = [];
                    $this->analyzeRecord($results, $table, $fields, $row);
                    $this->checkLinks($results, $linkTypes);
                }
            }
        }
    }


Files

exception_log.txt (24.1 KB) exception_log.txt Sybille Peters, 2022-09-11 08:03
bodytext_content_source.txt (252 KB) bodytext_content_source.txt Sybille Peters, 2022-09-11 08:06

Related issues 3 (2 open1 closed)

Related to TYPO3 Core - Bug #98120: Link parsing problem in linkvalidator Closed2022-08-10

Actions
Related to TYPO3 Core - Bug #97937: Linkvalidator: Links and   in tt_content.bodytext cause problems in UrlSoftReferenceParserUnder Review2022-07-14

Actions
Related to TYPO3 Core - Bug #95878: In linkvalidator, soft reference parser extracts 2 links from rich text with URL as anchor textUnder Review2021-11-05

Actions
Actions #1

Updated by Sybille Peters over 1 year ago

  • Related to Bug #98120: Link parsing problem in linkvalidator added
Actions #2

Updated by Sybille Peters over 1 year ago

  • Related to Bug #97937: Linkvalidator: Links and   in tt_content.bodytext cause problems in UrlSoftReferenceParser added
Actions #3

Updated by Sybille Peters over 1 year ago

  • Related to Bug #95878: In linkvalidator, soft reference parser extracts 2 links from rich text with URL as anchor text added
Actions

Also available in: Atom PDF