No uri/link from neos-link.node ViewHepler with node-identifier (Paths must not contain two consecutive slashes.)

Hi,
I’ve got an strange Exception «Paths must not contain two consecutive slashes.»
I have create a nodeType for a link-form-field with LinkEditor.

editor: 'TYPO3.Neos/Inspector/Editors/LinkEditor' 

All is good, I can choose a internal or paste an external link.
BUT the viewHelper seems to have a problems with node-identifier-hash.

<f:debug>{link}</debug>

output is good:
“node://3a87894d-5a06-421d-bfa1-cd21bba922b2” :
exact the same data like the content in the database.

<neos:link.node node="{link}">linkText</neos:link.node>

So, the fluid-helper neos.link.node seems to struggle over Neos’ identifier-labeling. I can’t deliver more exact node to the link-node-viewHelper than the node-identifier. But in the NodePath:normalizePath() static function, there is a checkup for doubleSlash (’//’). Looks like the snake biting its own tail…

Can’t find an explanation in the documentation; only ***«node: A node object or a string node path or NULL to resolve the current document node»***. Do I have to create a node-object from the node-hash in typoscript? If yes, unfortunately for this common situation, the documentation has no helping information nor an example about.

What do I have to do, to get a url/link from the identifier-hash?
Is there a work-around, if Neos has problems with its own identifier-labeling?

Would be great if someone could point me in the right direction.

Hello,
I have found a functioning work-around. But I’m quite sure there is a much more easy and lightweight solution.

  • Replace the «node://» with ‘’
  • than prepend a «#» and
  • do a find() for get the node and
  • get(0) for clean from unnecessary
    sounds like a lot of overload.
#roots.ts2

nodeLink = TYPO3.Neos:NodeUri {
		node = ${q(node).find('#' + String.pregReplace(q(node).property('link'),"/node:\/\//", '')).get(0)}
	}
#fluidTemplate

<a href="{nodeLink}">LinkText</a>

Would appreciate shorter and more tidy solutions.

Basically the node link viewhelper need a node or a node identifier prefixed by #

nodeLink = ${q(node).property('link')}
nodeLink.@process.convertUris = TYPO3.Neos:ConvertUris {
	forceConversion = true
}

Now the nodeLink must contain a URI to the given node, also work with link to asset (asset://), and can process a string with multiple link inside (like a text with multiple a element).

My 2 cents, about this one, use @process to make your TS more readable

nodeLink = TYPO3.Neos:NodeUri {
    node = ${q(node).property('link')}
    node.@process.removeProtocolPrefix = ${String.pregReplace(value, "/node:\/\//" , '')}
    node.@process.findByIdentifier = ${q(node).find('#' + value).get(0)}
}

ConvertUris prototype/class it is the more tidy solution I wished. Works perfect with <a href> in fluid-template.
Your 2c-@process will cleanup some piece of my code. Maybe I will use the NodeUri-way for other situations.
Thanks for your help.

Just FYI there’s an unfinished pull request to make this possible https://github.com/neos/neos-development-collection/pull/80