You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello,
when creating previews of libreoffice documents I get the following error:
unlink(/var/local/nextcloud/data/Myname/files/myfile.png): No such file or directory at /usr/share/webapps/nextcloud/lib/private/Preview/Office.php#65
I did some digging and found two problems:
libreoffice needs a home folder to run, even headless, as it creates some .config files; but my http user didn't have one. I fixed it by adding putenv('HOME=' . $tmpDir);
in .../lib/private/Preview/Office.php, before line 53
the output folder of the conversion to png is $tmpDir (see .../lib/private/Preview/Office.php, line 51) while the previewer looks for the png file in $dirname. So I changed $pngPreview = $dirname . '/' . $filename . '.png';
to: $pngPreview = $tmpDir . '/' . $filename . '.png';
in .../lib/private/Preview/Office.php line 59.
This solved my problem, but I am not sure if it's a good fix, especially the first part.
Activity
kesselb commentedon Dec 18, 2019
Fixed by #18456
SKB-CGN commentedon Nov 29, 2021
Hi,
seems, that the error comes again with Nextcloud 22.2.3 after upgrade.
I do not see office previews anymore.
Seems, that the instance-id or the folder is not returned properly.