I created a plugin "Foo" to define a custom field type "time". In my files/client/modules/foo/src/views/fields/time.js I have defined the view with a namespace prefix foo::
I can create a field of this type in an entity and add it to my layout. But as soon as I want to create a new instance of my entity type, ESPO stops with a js error because it tries to load view views/fields/time instead of foo:views/fields/time. So it looks for the file in client/src/views/... instead of client/modules/foo/src/views/... Why is the prefix lost?
The strange thing is: the field-manager view in client/modules/foo/src/views/admin/field-manager/fields/time/default.js is loaded correctly.
As soon as I copy all my files directly to the core-paths, everything works fine. But doesn't this whole module-mechanism and the prefixing exist to prevent that? Were there any changes in the module loading mechanism? The extension https://github.com/ayman-alkom/EspoDataGrid shows the same errors in 4.8.1.
Code:
Espo.define('[COLOR=#FF0000]foo:[/COLOR]views/fields/time', 'views/fields/base', function (Dep) { return Dep.extend({ type: 'int', editTemplate: 'foo:fields/time/edit', ...
The strange thing is: the field-manager view in client/modules/foo/src/views/admin/field-manager/fields/time/default.js is loaded correctly.
As soon as I copy all my files directly to the core-paths, everything works fine. But doesn't this whole module-mechanism and the prefixing exist to prevent that? Were there any changes in the module loading mechanism? The extension https://github.com/ayman-alkom/EspoDataGrid shows the same errors in 4.8.1.
Comment