Closed jeroenv closed 3 years ago
Hi, i had the same Problem. Labels created with Dymo 1.3.2 are getting this fault.
FIX for the Moment: Create the Label with Dymo 8.x.x (Latest Version), This Label can be printed with the Framework
Hi @jeroenv, please add the closure tag to the Color element.
Replace <Color A="1" R="0" G="0" B="0"/>
by <Color A="1" R="0" G="0" B="0"> </Color>
.
See the following link #8.
Hi @jeroenv, please add the closure tag to the Color element. Replace
<Color A="1" R="0" G="0" B="0"/>
by<Color A="1" R="0" G="0" B="0"> </Color>
.See the following link #8.
I can confirm that adding a space between the opening and closing tag of the Color element fixes the issue.
@dymosoftware is this something that will be fixed in the DYMO Connect software? Because I just created the label with the software and didn't change the XML after uploading it to print it with the DCD service through web.
Yes, a fix for this issue will be available on further updates. We will let you know once this issue is fixed. Thanks a lot!
@dymosoftware Can you please provide an estimate as to when this issue will be resolved?
This issue has been confirmed on Jan 28 2022 still being a problem. The ticket should be reopened until a proper commit fixes the issue.
This is not a fix
<Color .../>
or <Color ...></Color>
is perfectly valid XML.
/<(color) ([^\/>]*?) *\/?> *(<\/\1>)?/ig
and <$1 $2> <$1>
might be a better regex. But it's just bypassing the bug rather than fixing it. The real bug should reside in your XML parser.
And you don't need to define a function to rewrite a string:
dymo.xml.serialize = function(node) {
node = node.replaceAll(/<(color) ([^\/>]*?) *\/?> *(<\/\1>)?/ig, "<$1 $2> </$1>"); // Bypass parser bug by giving the element a blank space value
return goog.dom.xml.serialize(node);
}
This is certainly a problem since Dymo Connect editor saves the label without a space...Hard to imagine this is a difficult fix.
This is not a fix
yeah, that's a hack. But potentially better because we can control what .js is loaded. Harder to control which version of Dymo Connect users are running. But should be FIXED and the workaround kept in for backward compatibility.
This is not a fix
<Color .../>
or<Color ...></Color>
is perfectly valid XML.
/<(color) ([^\/>]*?) *\/?> *(<\/\1>)?/ig
and<$1 $2> <$1>
might be a better regex. But it's just bypassing the bug rather than fixing it. The real bug should reside in your XML parser.And you don't need to define a function to rewrite a string:
dymo.xml.serialize = function(node) { node = node.replaceAll(/<(color) ([^\/>]*?) *\/?> *(<\/\1>)?/ig, "<$1 $2> </$1>"); // Bypass parser bug by giving the element a blank space value return goog.dom.xml.serialize(node); }
This worked for me. @dymosoftware when will you release this fix?
@chibeepatag You are a savior! After banging my head trying to figure out where this ghost '' closing tag saved the day. One note, I had to use the function they used because it doesn't seem replace all works with the node unless it's passed through goog.dom.xml.serialze(node)
dymo.xml.serialize = function(node) {
function fix (node) {
return node.replaceAll(/<(color) ([^\/>]*?) *\/?> *(<\/\1>)?/ig, "<$1 $2> </$1>");
}
return fix(goog.dom.xml.serialize(node));
}
@dymosoftware please step up your game, this has been an issue since 2020!
I'm having an issue with the DYMO Connect Service on Windows when trying to render labels created with the new DYMO Connect Software (v1.3.2.14). The DYMO Connect Service throws a 500 error with the following error message:
Element
is an invalid XmlNodeType.I'm using the javascript DYMO Connect framework and have also installed the DCD service correctly (see screenshots). I've also validated the label xml with the isValidLabel method and this returns true, so don't know why the service itself fails...
You can find a demo project to test this issue here: https://cheqroom-cdn.s3-us-west-2.amazonaws.com/dymo-demo/VisitorManagement.html (if you check in the network tab, you will immediately see a 500 error on the RenderLabel request)