Open wetneb opened 4 months ago
Interesting. I tested adding an empty module/macros.vm and that looks to have solved both https://github.com/OpenRefine/CommonsExtension/issues/120 and https://github.com/OpenRefine/OpenRefine/issues/6581. At least the immediate issues, reconciliation not loading and source for Commons missing, respectively.
This error is displayed in the logs and does not halt the further initialization of the Commons extension as a Butterfly module.
@wetneb This was a common thing in the early days of the extension mechanism and David fixed it by forcing the exception to always display on the browser and not load the Project index page (that's how I recall it working in 2.7 I think). Somehow that has changed over the years or recently?
@tfmorris This is what I was referring to that if 1 extension doesn't load... show that on the browser...and halt and do not bother loading additional extensions or OpenRefine core (this used to work that way before some time ago, maybe 2.7? dunno). Anyways, this will let users know something is up with an extension loading and they can choose to disable/uninstall it/report it to us or the maintainer.
Yes sorry that's a typo on my part, I meant 0.1.1.
It appears that the behavior of Velocity changed sometime between 1.5 and 1.6.3. This init()
call:
https://github.com/OpenRefine/simile-butterfly/blob/32caedc892a08fc8622fee373407db9224a6996c/main/src/edu/mit/simile/butterfly/Butterfly.java#L862
can now throw an exception where it never did before.
I think maybe the assumption was the the module configure operation couldn't fail, only the initialization could.
We should rework the exception handling (and refactor the big configure method so that it's not so long & deeply nested), but for the immediate issue, this can be fixed in the OpenRefine scope by reverting the Velocity 1.5.
Also, any Velocity init()
error will cause this failure mode, but this specific problem is a actually bug in the Commons Extension, which was previously hidden by Velocity, where it has a property file entry pointing to a non-existent macro file.
When running OpenRefine 3.8.1 with the Commons extension
0.1.00.1.1, we get an error because of a missingmacros.vm
file:This error is displayed in the logs and does not halt the further initialization of the Commons extension as a Butterfly module. Curiously enough, it seems that the Commons extension then gets initialized but with the wrong
controller.js
file: the./main/webapp/modules/core/MOD-INF/controller.js
file in OpenRefine is run for the Commons extension, re-registering all the main components as if they belonged to the Commons extension. This, in turn, causes https://github.com/OpenRefine/CommonsExtension/issues/120 because it registers a second copy ofsuggest-4_3a.js
in theproject-bundle.js
.