You can update this code in the following paths, It will be resolved:
Possible cause: Due to keep new_url field is empty.
Paths: Root Joomla/plugins/system/redirect/src/Extension/Redirect.php on line 245
elseif ($redirect === null) {
// No redirect object was found, so we create an entry in the redirect table
if ((bool) $this->params->get('collect_urls', 1)) {
if (!$this->params->get('includeUrl', 1)) {
$url = $urlRel;
}
$nowDate = Factory::getDate()->toSql();
// Add a default value for new_url (can be set to a placeholder or actual value)
$new_url = 'your-default-url'; // Replace with your actual default URL or logic
$data = (object) [
'id' => 0,
'old_url' => $url,
'new_url' => $new_url, // Ensure new_url is included
'referer' => $app->getInput()->server->getString('HTTP_REFERER', ''),
'hits' => 1,
'published' => 0,
'created_date' => $nowDate,
'modified_date' => $nowDate,
];
try {
$this->getDatabase()->insertObject('#__redirect_links', $data, 'id');
} catch (\Exception $e) {
$event->setError(new \Exception($this->getApplication()->getLanguage()->_('PLG_SYSTEM_REDIRECT_ERROR_UPDATING_DATABASE'), 500, $e));
return;
}
}
}
Note: After update joomla, It will gone. (When you redirect don't miss put new url.)
Thanks,