Skip to content
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

Document : bug with cloud links (when trying to move it) #3596

Closed
tanchon opened this issue Nov 1, 2020 · 4 comments
Closed

Document : bug with cloud links (when trying to move it) #3596

tanchon opened this issue Nov 1, 2020 · 4 comments

Comments

@tanchon
Copy link

tanchon commented Nov 1, 2020

Hi,

In the configuration.php file, I enabled cloud links in document tool : $_configuration['enable_add_file_link'] = true;

In my document tool i created some folders : fold1 fold2...
... and i created some cloud links : link1 link2 link3...

Everything is ok except when i want to move one of the link to another folder (from "document/" to "document/fold1/" for example.

I select link1 and try to move this file to "fold1/" : this link is correctly moved but ... the link2 link is moved to !

When i make the opposite and I try to transfer the links1 from document/fold1 to document/, it is the same issue : the link2 is moved to !

After these manipulations, another issue appear : the fold1 folder diasppears from my list of documents ! And when i try to create it, it is impossible : a warning message appears (the folder already exists).

Expected behavior
It should be possible to move the cloud links one by one, without any issue with folders.

**Server
Chamilo 1.11.12
PHP 7.3

This issue occurs with the "general" document tool and the "document" tool of the groups.
It occurs with every folder selected as a destination.
Even when the domain names are different the issue can occur.

Sometime, there is no problem : i couldn't determine any explanation.

Some screenshots
Capture10
Capture11
Capture12

Thanks.

Tanchon.

@carlangas159
Copy link
Contributor

Hi @tanchon

I have observed the problem, I have made a slight change that you can see in the pr #3660, I comment that for the current links you must verify that the path field in c_document is correct, because the fault consists of

If the link is in folder 2 and you want to move it to folder 1, the path field would be folder-2 / folder-1 which is wrong, therefore in the path fields the folder-1 text must be eliminated so that reestablish.

imagen
I put an image to show you that you should delete in your database if it is the case.

@tanchon
Copy link
Author

tanchon commented Nov 23, 2020

Hi @carlangas159,

I've made the adjustment into the document.php file and then i made a test with new links : it seems that there is still a problem.

1 : my new links into their new folders :
Capture0

2 : the DB :
Capture

After that, i move one of the link to another folder : test rép visio2... and the same bug occurs (the two links are moved) :

Capture3

in the DB :
Capture2

In the DB the link names seem to be ok... but the bug remains when moving links...

Thanks.

Tanchon

@carlangas159
Copy link
Contributor

hi @tanchon

I have verified and indeed all the contents of the source folder are copied to the destination, when it should not be like that.

Could you verify this change? here I adjust the update of the link so that it is only the link, and not all the links, that will move
69ac604

@tanchon
Copy link
Author

tanchon commented Nov 24, 2020

Hi @carlangas159

Great ! It works perfectly now !

I made some tests , moving many times some links, in different level of folders. I modified some link names and folders.... and evrything is still working !
I verified into the DB : it also seems to be ok !

Thanks a lot for this work, because my students often use cloud links and the issue was annoying.

Tanchon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants