[Neos] Internal link handling: current status

Bastian Waidelich bastian at typo3.org
Thu Oct 24 17:55:41 CEST 2013


Hey guys,

for a while I'm working on (internal) link support in Neos now.
Actually the current approach is quite trivial. But I needed some 
attempts and as usually I got sidetracked by many related things that 
needed some love. But IMO the current state is a good foundation and can 
be merged into the next alpha release.

One issue I had was Caching: Currently outgoing URIs are not cached at 
all in neos due to the fact that the "node" argument is not 
serializable. This has a huge impact on performance for large sites 
because all routes have to be built and parsed for every page link!

Incoming links are already cached. But this cache needs to be 
invalidated as soon as the node path (= URI) for a node changes because 
it was (re)moved.

So we had to work on the "automatic redirect" feature first and got 
pretty far (thanks to Tims help).

Steps to test this:

1. Turn of JavaScript minification 
(TYPO3.Neos.userInterface.loadMinifiedJavascript: FALSE)

2. Apply the Flow patch for "Configurable Redirects" 
(https://review.typo3.org/#/c/24223/)

3. Apply the five patches related to "link-support": 
https://review.typo3.org/#/q/status:open+branch:master+topic:link-support+owner:%22Bastian+Waidelich%22,n,z

3. ./flow doctrine:migrate (for the Redirection entity)

4. ./flow flow:cache:flush (for changed policies)

Now there are two things to test:

If you select an aloha text (or headline) and click the link symbol you 
can type the name of a page and it should provide auto-completion (the 
aloha dialog needs styling, it's almost invisible on white backgrounds 
currently).

If you select a page it should link the marked text with a 
"node://<UUID>"-like link.

When you publish the page (heads up: when you only add a link, the 
change is not registered and you can't publish it. So you should type 
something as well) those node-links are replaced by proper links in the 
live workspace. They are *not* replaced in the backend on purpose.


The other thing to test is the automatic redirect handling:

When you move, create or delete a page (or when you change its node 
path) a redirection is created *as soon as you publish related page 
nodes* to the live workspace.

You can see the generated redirections with:

./flow redirection:list

At the same time the routing cache for related nodes is flushed, so if 
you navigate to "old-path.html" in Frontend, you should be 301-ed to 
"new-path.html".



I hope, I didn't forget anything and that this can be merged asap. I'll 
be off until Tuesday.


-- 
Bastian Waidelich


More information about the Neos mailing list