FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
189 stars 228 forks source link

page.resources.fal does not fetch the correct resource non default language #1690

Open lygie2221 opened 3 years ago

lygie2221 commented 3 years ago

Hi there,

there are several bug tickets about issues with fal and translating pages. But all I can find deal with translation handling prior to TYPO3 8.7.

On TYPO 9.5.22, I have a page with resources. The page has a translation. The file resources on the translated page differ from that on the original page.

When I use <v:page.resources.fal table="pages" field="media" uid="{menuPage.uid}" as="images"> The Images will be fetched from the original page, not the translated.

If I add one line to vhs/Classes/ViewHelpers/Page/Resources/FalViewHelper.php

and instead if writing:

if (is_array($localisation)) {
   $record = $localisation;
}

i do

if (is_array($localisation)) {
  $record = $localisation;
  $record["_LOCALIZED_UID"]=$record["_PAGES_OVERLAY_UID"];
}

Everything works as I would expect.

lygie2221 commented 3 years ago

I see, this is a duplicate of https://github.com/FluidTYPO3/vhs/issues/1670

swisschocolate-zz commented 3 years ago

+1 Thx lygie2221 for the hack.

pulponair commented 3 years ago

Any news? No solution for 8.7 yet. Had to downgrade to vhs 6.0.0 :(((