-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
renaming of files/folders shows an error in phoenix #450
Comments
strange that this test didn't fail in Phoenix + OC 10. maybe if the second response is 404 instead of 500 then this goes unnoticed. we need to fix two things:
|
okay, so if I run ocis alone with its bundled assets, I see the error. however if I use the Phoenix repo's assets, no error on renaming. |
After clearing my phoenix env and reinstalling libs, the bug is now reproduceab.e so it's likely that some lib update is now triggering that double send |
okay, I managed to reproduce the issue: Using watch commands seem to make the bug disappear, maybe because the code is not minified the same way... |
this doesn't make any sense: diff below to show where I logged: diff --git a/apps/files/src/fileactions.js b/apps/files/src/fileactions.js
index 18249c59..2ab772f9 100644
--- a/apps/files/src/fileactions.js
+++ b/apps/files/src/fileactions.js
@@ -210,8 +210,10 @@ export default {
},
$_fileActions_renameResource(resource, newName) {
+ console.log('$_fileActions_renameResource', resource, newName)
this.toggleModalConfirmButton()
+ console.log('Calling renameFile', resource, newName)
this.renameFile({
client: this.$client,
file: resource,
@@ -219,6 +221,7 @@ export default {
publicPage: this.publicPage()
})
.then(() => {
+ console.log('hideModal')
this.hideModal()
})
.catch(error => {
diff --git a/apps/files/src/store/actions.js b/apps/files/src/store/actions.js
index cc6071a0..a72d7d83 100644
--- a/apps/files/src/store/actions.js
+++ b/apps/files/src/store/actions.js
@@ -648,6 +648,7 @@ export default {
}
},
renameFile(context, { file, newValue, client, publicPage }) {
+ console.log('renameFile', context, file, newValue)
if (file !== undefined && newValue !== undefined && newValue !== file.name) {
const newPath = file.path.substr(1, file.path.lastIndexOf('/'))
if (publicPage) {
diff --git a/src/store/modal.js b/src/store/modal.js
index d6556181..56bf8cd0 100644
--- a/src/store/modal.js
+++ b/src/store/modal.js
@@ -36,6 +36,7 @@ const actions = {
},
toggleModalConfirmButton({ commit }) {
+ console.log('toggleModelConfirmButton')
commit('TOGGLE_MODAL_CONFIRM_BUTTON')
}
} I'll see if I can fire up a debugger and see whether the framework is doing something weird |
@refs is your session still open / can you reproduce? If yes, please check the js console, if there are errors about duplicate registered routes. |
the bug is reproducible also with Phoenix v0.13.0 compiled locally... ocis beta8 which is the last stable release as using ocis-phoenix v0.9.0 which itself is based on Phoenix v0.12.0. so I'll try v0.12.0 next and hope the bug disappears.... |
the bug also appears with v0.12.0... at this stage it doesn't make sense because Phoenix was stable back with ocis beta8. so the problem might be either in the setup or on ocis branch #409. I'll now try the same procedure but with ocis beta8 and then ocis master. |
apparently 57f4953 in #409 fixes the issue. with the previous commits I get the error. but also, I started ocis-debug with this command so I don't think that ocis-phoenix should have any effect: so maybe there's another bug hidden there... |
Turned out that this was due to broken assets in an ocis-phoenix PR that we pinned in #409 We addressed faulty loading of phoenix assets in a separate PR. |
bin/ocis server
docker run --rm -e REDIS_DATABASES=1 -p 6379:6379 -d webhippie/redis:latest
file is renamed but the popup does not disappear and an error is shown saying that there was an error renaming
![rename](https://user-images.githubusercontent.com/2425577/90089616-86a82280-dd41-11ea-8738-7be96ae3c351.gif)
Phoenix sends two
MOVE
requests, one is successful the second one received a500
responseOCIS log:
The text was updated successfully, but these errors were encountered: