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

NC28 release #10

Closed
EiTiFuzzi opened this issue Dec 14, 2023 · 17 comments
Closed

NC28 release #10

EiTiFuzzi opened this issue Dec 14, 2023 · 17 comments

Comments

@EiTiFuzzi
Copy link

Please provide a NC28 release of occweb

@linkstat
Copy link

ping

@dem36rus
Copy link

+1

@essys
Copy link

essys commented Feb 12, 2024

+1

Such comments do not add any value or information to the ticket/request.
Please stop doing it.

Please read more about it here:
https://github.com/bradfitz/issue-tracker-behaviors

@Spanni26
Copy link

Sad to say, but I think this project is dead.
Sadly this is the only way to run occ commands on a webspace without ssh

@reteP-riS
Copy link

Replacing

OC::$server->getEventDispatcher(),
with
OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class),
seems to do the trick.

@mjeshurun
Copy link

Replacing

OC::$server->getEventDispatcher(),

with
OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class),
seems to do the trick.

Can you please explain where we need to change this line?
I'm running Nextcloud as a docker app in Unraid, but I'm not sure where to find the occweb app folder once the app is installed.

@reteP-riS
Copy link

Have a closer look at my post, please. It says you need to change line 35 in /nextcloud/apps/occweb/lib/Controller/OccController.php

@mjeshurun
Copy link

mjeshurun commented Feb 15, 2024

Have a closer look at my post, please. It says you need to change line 35 in /nextcloud/apps/occweb/lib/Controller/OccController.php

Thank you. I was able to find the folder, but in the Nextcloud docker instance it was located at a somewhat different path.
For me it was located under: /nextcloud/www/nextcloud/apps/occweb/lib/...
I can confirm @reteP-riS 's solution works.
Many thanks!

@smakdab240
Copy link

Thanks for this, it worked brilliant for me. I'm running the Nextcloud AIO docker setup so the file was located in /var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/custom_apps/occweb/lib/... plus I needed to tell Nextcloud to manually update the app (sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ app:update occweb).

It also appears this is now significantly quicker than previously AND it is much faster than running the docker execution command.

Great job!!

@tomspatz
Copy link

tomspatz commented Feb 18, 2024

thx reteP-riS your sollution works for me to as designed

@mjeshurun
Copy link

Replacing

OC::$server->getEventDispatcher(),

with
OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class),
seems to do the trick.

Can you please explain where we need to change this line? I'm running Nextcloud as a docker app in Unraid, but I'm not sure where to find the occweb app folder once the app is installed.

@reteP-riS do you think that a solution similar to the one you gave us can also fix the Extract app's incompatibility with Nextcloud 28?
PaulLereverend/NextcloudExtract#108 (comment)

@Rudiberto
Copy link

Replacing

OC::$server->getEventDispatcher(),

with
OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class),
seems to do the trick.

gorgeous!!

@KOCTET-SPB
Copy link

Замена

OC::$server->getEventDispatcher(),

с,
OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class),
кажется, делает свое дело.

Thanks, works great

@Fuseteam
Copy link
Contributor

Fuseteam commented Apr 6, 2024

submitted this as a pull request #11 now

@mjeshurun
Copy link

mjeshurun commented May 5, 2024

sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ app:update occweb

Hi @smakdab240 ,
I installed today Nexcloud AIO hub 7 on Unraid and would like to install and run the fix you mentioned for the occweb app.

Can I trouble you to please share the full terminal command you ran to nano the OccController.php file?

I'm new to Nextcloud AIO, and I'm not sure how to properly run the command, now that I don't have direct access to the Nextcloud AIO container files.

I tried to run this command:
sudo docker run -it --rm --volume nextcloud_aio_nextcloud:/var/www/html:rw alpine sh -c "apk add --no-cache nano && nano /var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/custom_apps/occweb/lib/Controller/OccController.php"

but I got a message saying the directory doesn't exist:
[ Directory '/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/custom_apps/occweb/lib/Controller' does not exist ]

@smakdab240
Copy link

Hey @mjeshurun,

I think you're calling the wrong path. The 'sudo docker run' command is used to create and launch the container. What you want to do is edit a file within the container. There are two options for this: Access the file via docker or access via the host. My recommendation is via the host as it only uses stock linux commands...no docker required.

To edit the file try:
sudo nano /var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/custom_apps/occweb/lib/Controller/OccController.php

If this fails again, I would recommend checking the path to your docker volume. This can be achieved by typing sudo docker volume inspect nextcloud_aio_nextcloud and checking the attribute "Mountpoint".
image

If the 'occweb' folder doesn't exist in that path, make sure you've already installed the application. This can be done either via the UI or from the OCC command. If using the OCC, try this command:
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ app:install occweb

Once you're inside the file, change line "OC::$server->getEventDispatcher()," to "OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class),"

After you've managed to save the change, run the following to update the application with your changes:
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ app:update occweb

Remember, you can always access the contents of the Nextcloud AIO container from the host by looking in the docker volumes path (for me this is '/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/').

If you want to run a command from within your container, then you'll need to run the docker command sudo docker exec --user www-data -it nextcloud-aio-nextcloud <command> replacing the "" with what you wish to do. For example: sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ will print the OCC help screen.

If you're still having issues, let me know where you get stuck and we'll work through the commands to check what you need.

TD;DR: It appears your command is wrong. If calling internal to the container, the internal path is '/var/www/html' but I would recommend accessing it external to the container.
Internal Access to containers can be achieved by running sudo docker exec --user www-data -it nextcloud-aio-nextcloud command_to_run.
External Access to containers can be found in the path '/var/lib/docker/volumes/'

@mjeshurun
Copy link

To edit the file try: sudo nano /var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/custom_apps/occweb/lib/Controller/OccController.php

Once you're inside the file, change line "OC::$server->getEventDispatcher()," to "OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class),"

After you've managed to save the change, run the following to update the application with your changes: sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ app:update occweb

Thank you so much!! @smakdab240
These commands were exactly what I was looking for and I didn't know how to form them myself.
It all works now :)))
Thanks again for taking the time to explain all the steps in detail.
I really appreciate your help 🙏🙏

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

No branches or pull requests