Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache mode uncached needs baseNodeName for URL genegation #2274

Open
zaveryukha opened this issue Nov 15, 2018 · 1 comment
Open

Cache mode uncached needs baseNodeName for URL genegation #2274

zaveryukha opened this issue Nov 15, 2018 · 1 comment

Comments

@zaveryukha
Copy link

zaveryukha commented Nov 15, 2018

Description

If I use cache mode 'uncached' URL doesn't get generated.

Steps to Reproduce

root = Neos.Fusion:Value {
  value = Neos.Neos:NodeUri {
    node = ${site}
  }
  @cache {
    mode = 'uncached'
      context {
        1 = 'site'
      }
   }
}

Expected behavior

In output should be current url for the node.

Actual behavior

Empty output.

Workaround

root = Neos.Fusion:Value {
  value = Neos.Neos:NodeUri {
    node = ${site}
    baseNodeName = 'site'
  }
  @cache {
    mode = 'uncached'
    context {
        1 = 'site'
    }
  }
}
@kitsunet
Copy link
Member

This happens because internally NodeUri relies on a context value "documentNode" being a node, which is used regardless if the given "node" is actually a node or just a path. Technically if "node" is a node instance we shouldn't need another one for linking. the workaround is to set the context variable name baseNodeName. This seems all like an outdated concept. We should just accept node or nodepath + baseNode (as a value directly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants