Yoast/Yoast-SEO-for-TYPO3

InvalidArgumentException in BreadcrumbStructuredDataProvider

christophlehmann opened this issue · 0 comments

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

Due to nested Sites a page in rootline might be in another Site and thus might don't have the current SiteLanguage.

If this is the case, then generateUri() in https://github.com/Yoast/Yoast-SEO-for-TYPO3/blob/main/Classes/StructuredData/BreadcrumbStructuredDataProvider.php#L117 leads to an Exception

#1522960188 InvalidArgumentException Language 1 does not exist on site ...

Screenshots

Bildschirmfoto 2023-02-07 um 10 11 31

Additional context

I would move the line in try catch block before that line.

Technical info

  • TYPO3 version: 11
  • Yoast SEO version: 8.3.