Issue Bug Closed

#87770f:link.page with non-integer pageUid fails to render

David Bascom 02/22/19, 12:07 updated 03/25/19, 21:43

Description

Up until version 8 it was possible to render the link to an image or uri using the pageUid-attribute of the f:link.page or f:uri.page-viewhelper, i.e.

Examples:

<f:link.page pageUid="path/to/image.jpg">...</f:link.page>
<f:link.page pageUid="en/">...</f:link.page>

This option is commonly used, for example when rendering the lightbox-link to the enlarged image or when using the VHS <v:page></v:page> viewhelper to render a menu or language-menu.

This is not possible anymore, reason: Link/PageViewHelper forces the type to (int) in line 82:

$pageUid = isset($this->arguments['pageUid']) ? (int)$this->arguments['pageUid'] : null;

As I can’t see any security-issues here in not forcing (int) this should be changed back again to string / mixed or an alternative provided (i.e. an argument “uri”). The <link>-ViewHelper is unfortunately not suitable either.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.