Skip to content

Commit

Permalink
[BUGFIX] og_image and twitter_image now have the correct foreign_matc…
Browse files Browse the repository at this point in the history
…h_fields -> tablenames when using the Record functionality
  • Loading branch information
RinyVT committed Feb 11, 2025
1 parent b9b7abc commit 74c5ac4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ We will follow [Semantic Versioning](http://semver.org/).
- Optimized images that are used in the Dashboard module and load them directly instead of through `f:image`
- Removed old unused images
- Translations are now correctly loaded based on the backend locale
- `og_image` and `twitter_image` now have the correct `foreign_match_fields` -> `tablenames` when using the Record functionality

## 10.1.0 January 27, 2025
### Added
Expand Down
13 changes: 11 additions & 2 deletions Classes/Record/Builder/TcaBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ protected function addDefaultSeoFields(): void
'canonical_link' => $GLOBALS['TCA']['pages']['columns']['canonical_link'],
'og_title' => $GLOBALS['TCA']['pages']['columns']['og_title'],
'og_description' => $GLOBALS['TCA']['pages']['columns']['og_description'],
'og_image' => $GLOBALS['TCA']['pages']['columns']['og_image'],
'og_image' => $this->getFileField('og_image'),
'twitter_title' => $GLOBALS['TCA']['pages']['columns']['twitter_title'],
'twitter_description' => $GLOBALS['TCA']['pages']['columns']['twitter_description'],
'twitter_image' => $GLOBALS['TCA']['pages']['columns']['twitter_image'],
'twitter_image' => $this->getFileField('twitter_image'),
'twitter_card' => $GLOBALS['TCA']['pages']['columns']['twitter_card'],
],
];
Expand Down Expand Up @@ -132,6 +132,15 @@ protected function addDescriptionField(): void
]);
}

protected function getFileField(string $tcaField): array

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 13, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (12, 8.1, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 12, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (12, 8.1, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 12, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 11, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 11, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (12, 8.1, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 11, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 13, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 13, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (11, 8.1, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 11, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 12, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 12, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 11, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 12, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 13, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 11, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 12, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 12, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (11, 8.1, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 12, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 13, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 11, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (11, 8.1, composerInstallLowest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (11, 8.1, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 13, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 13, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.2, 11, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (12, 8.1, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.

Check failure on line 135 in Classes/Record/Builder/TcaBuilder.php

View workflow job for this annotation

GitHub Actions / Tests (8.3, 13, composerInstallHighest)

Method YoastSeoForTypo3\YoastSeo\Record\Builder\TcaBuilder::getFileField() return type has no value type specified in iterable type array.
{
$tca = $GLOBALS['TCA']['pages']['columns'][$tcaField];
if (isset($tca['config']['foreign_match_fields']['tablenames'])) {
$tca['config']['foreign_match_fields']['tablenames'] = $this->record->getTableName();
}
return $tca;
}

public function getResult(): array
{
return $GLOBALS['TCA'];
Expand Down

0 comments on commit 74c5ac4

Please sign in to comment.