Open egonzalezg9 opened 3 years ago
I found this as well. The problem is here: https://github.com/apostrophecms/apostrophe-workflow/blob/c4c3e2d72f799a78e48415259d985555ea8a9e22/lib/modules/apostrophe-workflow-pages/index.js#L35-L40
The self.modulesReady
function does not return anything and doesn't run the callback so when Headless also improves the pages module and uses a self.modulesReady
method it can't run.
I think it should be changed to something like this:
const superModulesReady = self.modulesReady;
self.modulesReady = function(callback) {
return superModulesReady(function(err) {
if (err) {
console.error(err);
}
self.autoCommitPageMoves = self.apos.modules['apostrophe-workflow']
.options.autoCommitPageMoves || false;
return callback(null);
});
};
I haven't tested that much yet other than confirming a broken site can run with it.
Version 2.39.2 of workflow causes assembly to crash when creating new sites that utilize apostrophe-headless. All you need to do to reproduce is use version 2.39.2 and have a theme with the following apostrophe-headless configurations: