Closed sseide closed 8 months ago
Hi @sseide , thanks, we will emulate and get back to you!
+1, Same here
Encountering the same problem. Also affects other file types.
Hi @sseide , @kevinkuan1969 , @lethargicpillow , we found a method overlap with NC28, in a code section where NC28 sets up paths for loading application files. We have rewritten code on our end, please test with new CADViewer v9.44.2 and provide feedback. Thanks!
Hello,
tested today with v9.44.2 / C28 and it seems to work again. Can open DXF, PDF, MD and Office files within Nextcloud Web-UI.
Only thing i had to do after the update was reloading the Nextcloud page (via Shift+F7). Bevor reloading and just after updateing and re-enabling the CadViewer Plugin the Office files were downloaded and not opened within Nextcloud. Something old cached browser-side it seems...
Thanks
Tested the below 8 files all failed with below error message. Also noted the files cannot be opened at the beginning after the app is upgraded and enabled. Started open after many clicks.
** all the 8 files failed except jpg file.
sometimes i see this error too after upgrade to NextCloud - the Nextcloud updater removed the rewrite condition from the htaccess file.
Please check if the line - as stated in the install documentation - is inside your .htaccess
file
RewriteCond %{REQUEST_FILENAME} !/apps/cadviewer/converter/php/*\.*
or some file access rights are not fitting anymore for the plugin. I create an smaller update script myself to fix the file access rights. This on i run whenever i see the error above to fix it. The rights named in the installation description are too open for my feelings...
cat cadviewer_permissions.sh
#!/bin/bash
#
# description from https://github.com/CADViewer/NextCloud
# supplied scipt assigns way to much rights
DIR=/var/www/nextcloud/apps/cadviewer
WWW_USER=www-data.www-data
cd "$DIR" || exit 1
pushd "converter/converters" || exit 1
# create tmp directories if not there
if [ ! -d files ]; then
mkdir -p files
chown "$WWW_USER" files
fi
# conversions
chmod a+x ax2024/linux/ax202*
chmod +w files
chmod +w files/merged
chmod +w files/print
chmod +w files/pdf
popd
pushd "converter" || exit 1
# redlines
chmod +w content/redlines
chmod +w content/redlines/v7
# php scripts
chmod +w php/call-Api_Conversion_log.txt
chmod +x php/call-Api_Conversion.php
chmod +x php/save-file.php
#chmod +x php/*.php
popd
# nextcloud updated removes rewrite condition from .htaccess file
# check if re-adding is needed:
HTACCESS_FILE=$(realpath ../../.htaccess)
HAS_REWRITE=$(grep "apps/cadviewer" "$HTACCESS_FILE" | wc -l)
if [ "$HAS_REWRITE" = "0" ]; then
echo "Apache RewriteCond for CadViewer was removed from $HTACCESS_FILE"
echo "Please add following line directly above 'RewriteRule . index.php [PT,E=PATH_INFO:$1]'"
echo ""
echo "RewriteCond %{REQUEST_FILENAME} !/apps/cadviewer/converter/php/*\.*"
fi
We have installed the cadviewer plugin v9.40.6 as well as the "Nextcloud Office" plugin v8.3.1. We use a standalonce CODE server for Collabora Office, not the Built in Dev server.
As long as the Cadviewer plugin is enabled we cannot open office documents (ods, docx, xls, ...) anymore. Disabling the Cadviewer plugin office documents can be opened again and edited online.
Trying to open a office document with cadviewer enabled i see the following Error in the Browser Javascript console:
The problem (cannot open office documents) was also there with Cadviewer v.9.38.6. But i did not check if the same Javascript error was logged.