"undefined" is sometimes added to XSLT format when Test Format fails
This bug only appears occasionally, but I thought you'd like to know about it.
1) I run Test Format using a Feed Block (rss.txt) on a format
(version1.txt) that includes a tag that's missing a closing angle
bracket (my typo is <li tabindex="0")
2) Cascade Server flags the error.
3) I add the closing angle bracket and Cascade Server adds a extra
closing tag (behavior which I hate, but that's another issue).
4) I run Test Format again. This time the error message is 'An
error occurred while rendering asset preview: The element type
"xsl:when" must be terminated by the matching end-tag
"undefined</xsl:when>".'
5) BUT... Cascade Server also adds the word "undefined" to my
format just before the closing xsl:stylesheet. See
version2.txt.
6) I remove the extra closing tag (did I mention I hate that
behavior?) to fix an error introduced by Cascade Server (well, by
the serializer).
7). This time the error message is "An error occurred while
rendering asset preview: Non-whitespace text is not allowed in this
position in the stylesheet!"
8) I remove the word "undefined" from my format and the error is
gone.
- version1.txt 4.89 KB
- version2.txt 4.99 KB
- rss.txt 72.8 KB
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 11 May, 2015 01:27 PM
Hi Michael,
Unfortunately, I was not able to reproduce the behavior you described at the end of the steps you provided where
undefined
is added to the Format. I was able to reproduce everything up until that point, though. What is strange is the text being added when testing, since that should not be updating the contents of the Format, only transforming it.I have a few questions to see if we can try to narrow things down a bit:
undefined
is added, or are you simply clicking Test Format?I can see the issue here; however, this functionality is part of the editor's attempt to auto-complete code and technically it is working since you are closing the tag. Disabling this option would also disable the editor's ability to automatically close quotes and parentheses as well.
As a side note, I have encountered this behavior in desktop editors as well, so it is not limited to only this editor.
Please let me know if you have any questions.
Thanks!
2 Posted by Ryan Griffith on 27 May, 2015 07:45 PM
Hi Michael,
Just wanted to follow up to see if you had a chance to view my recent comment.
Please let us know if you have any questions.
Thanks.
3 Posted by Michael McGinni... on 27 May, 2015 08:41 PM
Sorry, I've been busy. I'm using Cascade 7.12.2 - f65d7
I was using Chrome Version 43.0.2357.65 (64-bit) on Ubuntu Linux.
Following those steps in Firefox on a similar format gave me this error message but didn't write "undefined" into the format:
An error occurred while rendering asset preview: The element type "xsl:when" must be terminated by the matching end-tag "undefined</xsl:when>"
I couldn't duplicate the error this time.
4 Posted by Michael McGinni... on 28 May, 2015 08:13 PM
Ah, I was leaving a step out. Clicking the Format Code button adds the words "undefined".
5 Posted by Ryan Griffith on 01 Jun, 2015 01:42 PM
Thank you for following up, Michael.
Just to confirm, you are referring to the "format code" button within the code editor's toolbar, correct?
Thanks!
6 Posted by Michael McGinni... on 01 Jun, 2015 02:13 PM
That is correct.
7 Posted by Ryan Griffith on 01 Jun, 2015 02:24 PM
Thank you for confirming, Michael.
It sounds as though the JavaScript library we are using to format the code is getting tripped up somewhere, which would explain why
undefined
is being added to the content.Let me take a closer look to see if I can reproduce the issue and I will be in touch as soon as I have additional information.
Please let me know if you have any questions.
Thanks!
Ryan Griffith closed this discussion on 30 Jun, 2015 06:45 PM.