-
Notifications
You must be signed in to change notification settings - Fork 26
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
Symphony Warning: DOMXPath::evaluate(): Invalid expression #31
Comments
The git command you set will fetch the latest version so 2.0.0 is the latest one. The bug is on the extension site. I've created the 2.0.0 release, thanks. Also, 2.0.0 introduced changes. Did you check the read me ? |
Thanks, @nitriques. I will try again at a later date when I have a Symphony installation I can test on.. I did check the readme, but it'd be good to have some example XPath expressions in there (one basic, one complex, one referencing a utility perhaps). I'd just like to check that it's intended behaviour that reflectionfield will interpret any XPath expression including those with functions? Because it seems like the version change breaks function usage, as per my original post. |
Slightly unrelated, the readme is becoming mangled on symphonyextensions.com with headings overlapping paragraphs (visible in screenshot above). I would open an issue on symphony-extensions-network, but it seems only to be reflectionfield's readme. Also the code block is rendering as one wrapping line (but maybe that is a site-wide issue). |
Noticed that too and think a separate issue at the symphony-extension-network would be the best to discuss this as the problem isn't limited to rhe reflection field repo. symphonyextensions.com is very restrictive regarding the formatting of the readme (it can't handle multiple H1s (like in this case), tables or code-blocks that use spaces instead of tabs). The question is if we can/will/should try to fix this on symphonyextensions.com or if we should set up more restrictive rules/recommendations regarding how to write/format the readme-files of extension-repos. Having said this I think I'll best simply copy this paragraph and post a new issue in the SEN-repo... Any further discussion regarding this can be held over there! |
|
@cylkee so the problem is the |
Yes.
Removing the XPath function, forming simply I've since gone back to v1.4.2. Is it the case that it should accept any XPath, which includes functions? Or are there restrictions not disclosed in the Readme? |
Maybe @nilshoerrmann knows why it would crash, since he made most of the code of version 2.0.0. Does it works if the code is only |
I think I've found it: https://github.com/symphonists/reflectionfield/compare/33f39845e4136c245ff26e8ffe4277a76f336af6...55a34e7?w=0#diff-dadafdd0b64efb75d1d13bd715068ccaR390 vs Try to remove the // ? or and the @ ? |
@nitriques No. |
So, in an installation with Symphony
If I amend to:
I must update the reflection from:
to:
for it to work. Or:
Either of which is entirely proper, given the new XML data structure. I don't know how to do a pull request though, I'm not Git-savvy. |
@cylkee This might be a good start: https://help.github.com/articles/creating-a-pull-request/
That was the fix I hope to land! I'll fix this right now. Thanks! |
The reflection is complex using XPath functions:
{entry/label} ({substring-before(entry/company/item, ' General Ltd.')}s)
The same reflection works in v1.4.2 on Symphony 2.6.11. If I change it to a simple reflection on this v2.0.0 instance, it works with
{entry/label} ({entry/company/item})
Also, something weird is going on. I did a
git submodule add git://github.com/symphonists/reflectionfield.git extensions/reflectionfield --recursive
on a new installation of2.6.11
and it gave mereflectionfield 2.0.0
. See also version disorder on:GitHub
and
symphonyextensions.com
The text was updated successfully, but these errors were encountered: