Issue Bug Closed

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

Sybille Peters 09/11/22, 08:07 updated 09/23/26, 07:38

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. use Debug mode
2. Add Tsconfig to also check links: mod.linkvalidator.linktypes = db,file,external
3. 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).
4. Run “Check links” in linkvadator Module tab “Check links” function

An Exception should be shown in BE

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);
                }
            }
        }
    }

Reviews 1

Files 3

History 14

  1. Georg Ringer commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2026-02-06T12:43:16+00:00" > 02/06/26, 12:43 </span>

    I just tested that on 14,13,12 and no exception. do I need more configuration?

  2. Sybille Peters commented and changed attached linkvalidator_broken_links.png status Needs Feedback Closed <span data-processor="relativetime" data-value="2026-02-07T08:28:01+00:00" > 02/07/26, 08:28 </span>

    Georg Ringer,

    > I just tested that on 14,13,12 and no exception. do I need more configuration?

    I added this TSconfig for also checking external links:

    mod.linkvalidator.linktypes = db,file,external

    (also added in description above).

    I could not reproduce the problem with the description above (“Reproduce”) on a v13 system.

    I did another test with only this in a textmedia element and checked links:

    <p>
        <a href="http://t3coredev13x/abc" data-rte-error="External link is broken">http://t3coredev13x/abc</a>
    </p>

    This result is 2 broken links shown. This is a known problem, but this issue (exception) was not reproducible.

    linkvalidator_broken_links.png

  3. Josef Glatz commented and changed status Closed Needs Feedback assigned to Josef Glatz <span data-processor="relativetime" data-value="2026-02-10T06:54:02+00:00" > 02/10/26, 06:54 </span>

    Still valid on v13 on an upgraded TYPO3 13 instance (from v10). The scheduler task fails due this issue on a regular base.

    @speters please keep the issue open. I try to construct a reproducable demo setup

  4. Oliver Gassner commented <span data-processor="relativetime" data-value="2026-09-22T08:40:08+00:00" > 09/22/26, 08:40 </span>

    easy to reproduce by creating a valid redirect record that leads to a too long tx_linkvalidator_link.headline.

    INSERT INTO sys_redirect
          (pid, source_host, source_path, target, target_statuscode)
      VALUES
          (123, '*', CONCAT('/linkvalidator-test-', REPEAT('x', 260)),
           't3://page?uid=999999999', 301);

    btw, the fix from https://github.com/TYPO3/typo3/commit/47eac8ba460210ccb6a5586478ee3b47e9b80279.patch works also on v13.

  5. Sybille Peters commented <span data-processor="relativetime" data-value="2026-09-23T07:28:57+00:00" > 09/23/26, 07:28 </span>

    About

    > fix from https://github.com/TYPO3/typo3/commit/47eac8ba460210ccb6a5586478ee3b47e9b80279.patch works also on v13.

    It looks like this is the review:

    [BUGFIX] Fix Linkvalidator Data too long for column ‘headline’

    https://review.typo3.org/c/Packages/TYPO3.CMS/+/95139

    It was merged for main (v15) and v14, not for v13.

    These 2 isssues were reference, but not this one:

    • Resolves: #110244
    • Related: #108581

    If these are duplicates and / or this fixed the issue, I assume we cannot expect it will get backported to v13.

  6. Sybille Peters commented <span data-processor="relativetime" data-value="2026-09-23T07:31:27+00:00" > 09/23/26, 07:31 </span>

    I don’t know what Feedback I should give. It still has “Needs Feedback”.

  7. Georg Ringer commented <span data-processor="relativetime" data-value="2026-09-23T07:37:16+00:00" > 09/23/26, 07:37 </span>

    so it seems that this is fixed, only in v14+ – so I am for closing it

  8. Sybille Peters changed status Needs Feedback Closed TYPO3 Version 12 13 <span data-processor="relativetime" data-value="2026-09-23T07:38:59+00:00" > 09/23/26, 07:38 </span>