I get errors like Field %field for %type %label in language %langcode not saved, invalid uri "%uri" for internal URIs like internal:/node/1.
Create content type with link field.
Create content with an external URL like https://drupal.org
Upload it for translation to Lingotek.
Download the translation.
Update the URL to an internal one, e.g. /node/1.
Upload for translation.
Try to download translation.
See the URI remained unchanged.
See watchdog warning.
As Url::fromInternalUri() states:
when using a PathValidatorInterface to validate 'internal:' URIs, we must map:
'internal:' (path component is '') to the special '' path
'internal:/' (path component is '/') to the special '' path
'internal:/some-path' (path component is '/some-path') to 'some-path'
We cannot pass in internal URI to it directly and should convert it to a URL first.
Also, PathValidatorInterface::isValid() also checks access of current user to the path which is not needed. It makes sense to use PathValidatorInterface::getUrlIfValidWithoutAccessCheck() method instead.
Needs review
4.1
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.