ACTom / files_mindmap

This application enables Nextcloud users to open, save and edit mind map files in the web browser.
GNU Affero General Public License v3.0
175 stars 48 forks source link

Adapt to NC 28 #190

Closed artonge closed 8 months ago

artonge commented 11 months ago

The Files API changed a bit in NC v28.

Here are the changes:

Drawback, the app is only compatible with 28. I guess we could make it compatible with previous versions by keeping both API.

Fix https://github.com/ACTom/files_mindmap/issues/191

artonge commented 11 months ago

@ACTom The PR is ready, let me know what you think :)

artonge commented 10 months ago

@ACTom can you merge the PR?

iYongHsu commented 10 months ago

@artonge Hello, I pulled your Git branch, compiled it, and when I try to open the km file in Nextcloud, it prompts 'An internal server error occurred.

artonge commented 10 months ago

when I try to open the km file in Nextcloud, it prompts 'An internal server error occurred.

Can you share more information about the error?

ACC-Tony commented 10 months ago

Excuse me, but I'm not an expert in developing web apps. Could you provide some information about how to build this?

I used the Makefile to pack the revised code and put it in the nextcloud/apps/ dir, but nothing happens.

Tips for those who are struggling with this app: I found an extension in vscode: vscode-mindmap This extension supports the .km file, and I'm currently using it as a replacement.

artonge commented 10 months ago

Let's keep the comments about the content of the pull request and not about how to install it :). If you need help, the Nextcloud forum is the right place.

iYongHsu commented 10 months ago

when I try to open the km file in Nextcloud, it prompts 'An internal server error occurred.

Can you share more information about the error?

GET /apps/files_mindmap/ajax/loadfile?filename=%2FDocuments%2FNew%20mindmap.km&dir=%2FDocuments 400

admorgan commented 10 months ago

I also pulled the branch and ran make. Copied the executable to my server. I didn't get an error, just didn't get nextcloud to give me the option to create a new mindmap nor open the existing .km files on my server.

gmag11 commented 10 months ago

@artonge Hello, I pulled your Git branch, compiled it, and when I try to open the km file in Nextcloud, it prompts 'An internal server error occurred.

I have the same issue. When the file is in root folder it works fine. But if file is in any folder it gives 'An internal server error occurred'.

Creating a new mind map works in any folder. You can edit and save action is fine. When you try to open it, error happens when not in root folder.

artonge commented 10 months ago

Creating a new mind map works in any folder. You can edit and save action is fine. When you try to open it, error happens when not in root folder.

Thanks for the feedback, the issue is addressed now :)

Weredime commented 9 months ago

@ACTom can you merge the PR?

Seems that as if @ACTom is inactive now

ernolf commented 9 months ago

For me it works without any errors. I can create-, edit- and open .km files in any folder. Only remaining issue: Shared .km files don't open but only offer download.

node: 'v21.6.1', npm: '10.2.4' Nextcloud 28.0.2 RC5

ernolf

artonge commented 9 months ago

Only remaining issue: Shared .km files don't open but only offer download.

Was it the case before?

michauk commented 9 months ago

For me it works without any errors. I can create-, edit- and open .km files in any folder. Only remaining issue: Shared .km files don't open but only offer download.

node: 'v21.6.1', npm: '10.2.4' Nextcloud 28.0.2 RC5

ernolf

OK, I only have 2 shared .km files. That must be why I can't open them. I don't have the button to create a new one, either. I copied one the shared file I have, can't open. I tried with the code from the forked repo I'm a bit lost. I "git archived" the artonge/adapt_to_28 branch. Maybe I did something wrong with my git commands (I'm not totally a "git" guy)

@artonge : before that, in NC27, yes, shared km were working. I only have shared mindmap files.

Regards

maurerle commented 9 months ago

I can confirm that this works well.

I give some more instructions for @michauk (though it won't help you as shared mindmap files are still broken)

First uninstall files_mindmap in nextcloud.

git clone https://github.com/nextcloud-gmbh/files_mindmap
cd files_mindmap
git checkout artonge/adapt_to_28
make

This runs npm and takes a while. Now copy build/files_mindmap-0.0.30.tar.gz to your server and extract it.

tar xvf files_mindmap-0.0.30.tar.gz nextcloud/custom_apps
# eventually adjust permissions to the same user as the other custom apps have:
chown -R 82:82 nextcloud/custom_apps

The tar.gz is about 60MB large - which is quite heavy.

Now you can activate the app in the UI and have it working :)

ernolf commented 9 months ago

Was it the case before?

Yes absolutely. Example from a Nextcloud 27.1.6 Server: https://global-social.net/s/php-updater-mindmap

ernolf commented 9 months ago

I'm a bit lost.

You can try my build: https://help.nextcloud.com/t/nc28-mindmap-km-files-not-working/176809/11?u=ernolf

rodinux commented 9 months ago

I'm a bit lost.

You can try my build: https://help.nextcloud.com/t/nc28-mindmap-km-files-not-working/176809/11?u=ernolf

Thank you @ernolf , it works like a charm for me, also after upgrading to 28.0.2. I just upload your build, do a tar xvf files_mindmap-0.0.30.190.tar.gz, rename the folder files_mindmap, give him the correct permissions chown -R nextcloud: files_permissions, and place in the folder apps/ and activate it...

Why is it so long to accept the fix on the stable branch ??

Well, there is just something missing, I can't choose the name of the file when creating it, it is always New mindmap.km, If I create new one New mindmap(1).km. But I can rename them on the Files page and it still open them...

ernolf commented 9 months ago

Only remaining issue: Shared .km files don't open but only offer download.

Was it the case before?

@artonge : do you have a clue how to fix that?

artonge commented 9 months ago

@artonge : do you have a clue how to fix that?

The public page uses the legacy file list. So we need to restore the previous way file actions are registered to be compatible with both legacy and post 28 files API. Same thing for the "new file menu" I guess. This will also bring the benefit to keep the compatibility with previous versions of Nextcloud.

nursoda commented 9 months ago

@ernolf Thanks for building. Please consider removing "src node_modules package vite" from the package ;)

Mer0me commented 8 months ago

I've installed the patch, thanks to @ernolf build. Now waiting for a working solution for shared mind map. Is somebody working on it ?

msvp commented 8 months ago

Same for me, waiting for a working solution for shared mind map ! But i am just a user, can't help for programming anything...

msvp commented 7 months ago

Hello Every one ! No new solution for share a mindmap ? Please help ! Many thanks !

micker commented 6 months ago

hello i have same problem, no possibility share it (with edition)