Bug #53258

rendering of internal links doesn't work

Added by Benjamin Albrecht almost 2 years ago. Updated almost 2 years ago.

Status:Resolved Start date:2013-10-31
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:TypoScript
Target version:-

Description

Hi,

the rendering of internal links in text (new feature of alpha7) doesn't work with php 5.3.27 on my mac.

The problem seems to be a call to a protected method in class "ConvertNodeUrisImplementation".

Line 82:

$self = $this;
return preg_replace_callback(self::PATTERN_NODE_URIS, function(array $matches) use ($self, $node) {
    return $self->convertNodeIdentifierToUri($matches[1], $node);
}, $text);

The method "convertNodeIdentifierToUri()" is a protected method of class "ConvertNodeUrisImpementation".

AFAIK the call of protected methods inside of an anonymous function is not allowed with php 5.3.
After changing the method "convertNodeIdentifierToUri()" from protected to public the rendering works fine...

Associated revisions

Revision 3bdbe2f2
Added by Bastian Waidelich almost 2 years ago

[BUGFIX] Fix Rendering of internal links for PHP < 5.4

The ``ConvertNodeUris`` TypoScript implementation calls a protected
method from within a closure which is only supported with PHP 5.4+.

This change fixes this by making the respective method public.
It also adds unit tests for ``ConvertNodeUrisImplementation``.

Change-Id: I3dfd62b77ccb708926808becf04246eed7c2cc48
Fixes: #53258
Reviewed-on: https://review.typo3.org/25118
Reviewed-by: Bastian Waidelich
Tested-by: Bastian Waidelich
Reviewed-by: Aske Ertmann
Tested-by: Mr. Hudson
Reviewed-by: Sebastian Kurfuerst
Tested-by: Sebastian Kurfuerst

History

#1 Updated by Benjamin Albrecht almost 2 years ago

  • Assigned To set to Karsten Dambekalns

#2 Updated by Bastian Waidelich almost 2 years ago

  • Category set to TypoScript
  • Status changed from New to Accepted
  • Assigned To changed from Karsten Dambekalns to Bastian Waidelich

@Karsten I feel responsible for this - I hope you don't mind me taking over this one ;)

#3 Updated by Gerrit Code Review almost 2 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/25118

#4 Updated by Bastian Waidelich almost 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF