Skip to content

Commit

Permalink
[BUGFIX] Use always WebPage as type in breadcrumb
Browse files Browse the repository at this point in the history
Related: #101
  • Loading branch information
brotkrueml committed Oct 28, 2022
1 parent 993fd53 commit a269be6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Rich Snippet Tool interprets FAQPage in breadcrumb wrong (#101)

## [1.13.1] - 2022-06-13

### Security
Expand Down
5 changes: 0 additions & 5 deletions Classes/ViewHelpers/BreadcrumbViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ public static function renderStatic(
}

$webPageTypeClass = static::DEFAULT_WEBPAGE_TYPE;
if (\is_array($arguments[static::ARGUMENT_BREADCRUMB][$i]['data'] ?? false)
&& !empty($arguments[static::ARGUMENT_BREADCRUMB][$i]['data']['tx_schema_webpagetype'] ?? '')) {
$webPageTypeClass = $arguments[static::ARGUMENT_BREADCRUMB][$i]['data']['tx_schema_webpagetype'];
}

$itemType = TypeFactory::createType($webPageTypeClass);
$itemType->setId($id);

Expand Down
2 changes: 2 additions & 0 deletions Tests/Unit/ViewHelpers/BreadcrumbViewHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ public function itBuildsSchemaCorrectlyOutOfViewHelpers(string $template, array
*/
public function breadcrumbWithMultiplePagesAndWebPageTypesGiven(): void
{
self::markTestSkipped('Skipped, see https://github.com/brotkrueml/schema/issues/101');

/** @noinspection PhpInternalEntityUsedInspection */
GeneralUtility::setIndpEnv('TYPO3_SITE_URL', 'https://example.org/');

Expand Down

0 comments on commit a269be6

Please sign in to comment.