Needs work
Project:
Field States transitions
Version:
2.0.0
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2026 at 22:41 UTC
Updated:
11 Mar 2026 at 13:34 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #3
mortona2k commentedI'm still on drupal 10.x, which is compatible up to 2.0.0.
Comment #4
mortona2k commentedSeems to be working now.
Comment #5
lazzyvn commentedYour merge request simply changes the value of `minified: true` in the libraries. But for the CDN, this makes no difference. I test on drupal 11 it works fine i dont see any error in log
Comment #7
mortona2k commentedYou may be right about the external libraries, but there are also some internal libraries in the module that are causing issues.
Here is the aggregated js snippet that is causing the reported error:
eme=Xge(1.toString)This causes:
Uncaught SyntaxError: identifier starts immediately after numeric literalThis is coming from state_machine/dist/state-machine.umd.js:
eme=Xge(1 .toString)Notice the space between 1 and .toString.
I don't know what that code is supposed to mean anyway, it doesn't make sense with a space either.
I was able to fix it by recompiling the assets in /state_machine.
Funnily, the newly generated code has this, which seems to be ok:
tme=Jge(1.1.toString)Other changes to the libraries file were not needed.
I can't tell if this issue was really caused by aggregation, or triggered by it on a bad build?
The 2.0.0 build works when js is not aggregated, but breaks when it is.
Here is a patch for 2.0.0 that just recompiles the assets, and seems to work with/without aggregation.
This is likely necessary for any drupal 10.x users, and we might need a separate dev branch for it.
Comment #8
mortona2k commentedOn a fresh Drupal 11 install, any of these things fixed the error I got with the 2.0.0 release.
1. Disabling js aggregation.
2. Setting minified: true on state-machine.umd.js.
3. Recompiling state_machine assets.
Comment #9
mortona2k commentedComment #11
lazzyvn commentedtry dev version i use newsest version
error because Vite/esbuild build (1 .toString) and drupal remove space.