Active
Project:
Business Rules
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2019 at 10:57 UTC
Updated:
18 Jun 2019 at 21:13 UTC
Jump to comment: Most recent
Adding a new condition to a rule bundle custom entity gets js error (related to the Flow Chart):
mxClient.min.js?poawf5:24 Uncaught TypeError: a.push is not a function
at mxObjectCodec.addObjectValue (mxClient.min.js?poawf5:24)
at mxObjectCodec.decodeChild (mxClient.min.js?poawf5:24)
at mxObjectCodec.a.decodeChild (mxClient.min.js?poawf5:24)
at mxObjectCodec.decodeChildren (mxClient.min.js?poawf5:24)
at mxObjectCodec.decodeNode (mxClient.min.js?poawf5:24)
at mxObjectCodec.decode (mxClient.min.js?poawf5:24)
at mxCodec.decode (mxClient.min.js?poawf5:24)
at showFlowchart (mxEnd.js?poawf5:10)
at mxEnd.js?poawf5:14
To test:
Install https://www.drupal.org/project/email_confirmer and use Email Confirmer entity bundle into a rule, then add a condition.
Comments
Comment #2
lexsoft00 commentedComment #3
c.e.a commentedComment #4
thirdender commentedI'm having the same issue with 8.x-1.0-beta7. As soon as I added a condition to a rule I got the same JS error on the page. The problem was that I'd used quotation marks in the name of the rule and they weren't being properly escaped when the mxGraph XML was generated, resulting in the following malformed XML:
<UserObject label="After "Request partnership" form" link="/admin/config/workflow/business_rules/after_request_partnership_form/edit" ...Comment #5
cobblestone.consulting commentedSeeing if I can resurrect this issue as I am seeing it as well, but the use case is different. In my case, this happens if I add more than one condition to the success items of another condition. After adding the first one, everything works fine but as soon as I add the 2nd one, I see this error. Removing the 2nd one eliminates the error.
A little extra info: In the JS debugger, the "a" variable is of type "mxCell" in the case were it is working correctly, but "mxGraphModel" when it is throwing the error.
UPDATE [SOLVED] It turns out that some of my condition and action names had "&" characters that apparently are causing the issue. Changing them to "and" fixed the problem.