{"action":"created","issue":{"url":"https://api.github.com/repos/alkacon/opencms-core/issues/274","labels_url":"https://api.github.com/repos/alkacon/opencms-core/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/alkacon/opencms-core/issues/274/comments","events_url":"https://api.github.com/repos/alkacon/opencms-core/issues/274/events","html_url":"https://github.com/alkacon/opencms-core/issues/274","id":42082664,"number":274,"title":"CMSShell exit problem after replaceModule","user":{"login":"asdcdow","id":2387442,"avatar_url":"https://avatars.githubusercontent.com/u/2387442?v=3","gravatar_id":"","url":"https://api.github.com/users/asdcdow","html_url":"https://github.com/asdcdow","followers_url":"https://api.github.com/users/asdcdow/followers","following_url":"https://api.github.com/users/asdcdow/following{/other_user}","gists_url":"https://api.github.com/users/asdcdow/gists{/gist_id}","starred_url":"https://api.github.com/users/asdcdow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asdcdow/subscriptions","organizations_url":"https://api.github.com/users/asdcdow/orgs","repos_url":"https://api.github.com/users/asdcdow/repos","events_url":"https://api.github.com/users/asdcdow/events{/privacy}","received_events_url":"https://api.github.com/users/asdcdow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-09-05T19:48:09Z","updated_at":"2015-03-10T19:15:10Z","closed_at":"2015-02-17T15:00:46Z","body":"I am trying to use the CMSShell to automate the update of of a module.  To do this, I am using a shell script that calls CMSShell.  The important section out of the script is:\r\n\r\n```bash\r\ncms-shell <<HERE\r\n    login Admin admin\r\n    replaceModule 'com.asd.datatypes' '$module'\r\n    exit\r\nHERE\r\n```\r\n\r\nThis appears to run correctly and everything finishes.  The problem is that after this is run, none of the formatters in the module are found when trying to edit container pages.  The files exist in the VFS.  They just can't be found when editing the container pages.  If I open the container pages for editing, in the workspace, I get the the message 'Resource not found' on all of the formatter files.\r\n\r\nIt appears that this is caused by the 'Gallery Index' not including the new formatters.  Forcing the 'Gallery Index' to update makes these errors go away.  It looks like the CMSShell is trying to add the new files to the index but doesn't finish before the shell exits.  If add a command that takes a long time, such as `perf`, right before the `exit` command, then this problem disappears.  However, this seems kind of hacky and might not always work if the index update takes longer.  I can also add a command that forces the index to update, but that can take a long time.\r\n\r\nPlease make the `exit` command wait for the new files to be added to the index."},"comment":{"url":"https://api.github.com/repos/alkacon/opencms-core/issues/comments/78126393","html_url":"https://github.com/alkacon/opencms-core/issues/274#issuecomment-78126393","issue_url":"https://api.github.com/repos/alkacon/opencms-core/issues/274","id":78126393,"user":{"login":"asdcdow","id":2387442,"avatar_url":"https://avatars.githubusercontent.com/u/2387442?v=3","gravatar_id":"","url":"https://api.github.com/users/asdcdow","html_url":"https://github.com/asdcdow","followers_url":"https://api.github.com/users/asdcdow/followers","following_url":"https://api.github.com/users/asdcdow/following{/other_user}","gists_url":"https://api.github.com/users/asdcdow/gists{/gist_id}","starred_url":"https://api.github.com/users/asdcdow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asdcdow/subscriptions","organizations_url":"https://api.github.com/users/asdcdow/orgs","repos_url":"https://api.github.com/users/asdcdow/repos","events_url":"https://api.github.com/users/asdcdow/events{/privacy}","received_events_url":"https://api.github.com/users/asdcdow/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T19:15:09Z","updated_at":"2015-03-10T19:15:09Z","body":"Any chance this issue can be reopened?"}}