Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "File could not be converted to string" when targeting a File #89

Open
dasoe opened this issue Feb 10, 2022 · 0 comments
Open

Error "File could not be converted to string" when targeting a File #89

dasoe opened this issue Feb 10, 2022 · 0 comments

Comments

@dasoe
Copy link

dasoe commented Feb 10, 2022

Hi all,

thanks for the great extension!
When redirecting to a file in TYPO3 8.7.44 I get an error

Recoverable fatal error: Object of class TYPO3\CMS\Core\Resource\File could not be converted to string in /XXX/typo3conf/ext/my_redirects/Classes/Domain/Model/Redirect.php on line 236

I changed the appropriate line:

                    case LinkService::TYPE_FILE:
-                      $destination = 'File: ' . $urn['file'];
+                      $destination = 'File: ' . $urn['file']->getIdentifier();
                        break;

This seems to resolve the issue for me.

have a great day!
oe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant