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

Problems writing to temporal file #9

Open
dasch124 opened this issue Apr 9, 2021 · 1 comment
Open

Problems writing to temporal file #9

dasch124 opened this issue Apr 9, 2021 · 1 comment

Comments

@dasch124
Copy link

dasch124 commented Apr 9, 2021

Hi,
I'm experiencing strange problem with the latest release of the web-version of the editor, namely on saving I receive the following error:

Problems saving file ../data/lorem.xml: 400: Problems writing to temporal file
SvgCanvas/self.throwError@https://page-editor.acdh-dev.oeaw.ac.at/js/svg-canvas.js?v=2021.02.22:254:15
saveFile/<@https://page-editor.acdh-dev.oeaw.ac.at/js/web-app.js?v=2021.02.22:182:24
i@https://page-editor.acdh-dev.oeaw.ac.at/js/jquery-3.2.1.min.js:2:28017
fireWith@https://page-editor.acdh-dev.oeaw.ac.at/js/jquery-3.2.1.min.js:2:28783
A@https://page-editor.acdh-dev.oeaw.ac.at/js/jquery-3.2.1.min.js:4:14035
c/<@https://page-editor.acdh-dev.oeaw.ac.at/js/jquery-3.2.1.min.js:4:16323

Here's what the logs tell me:

==> error.log <==
[Fri Apr 09 14:43:35.004832 2021] [php7:warn] [pid 26] [client 172.17.0.1:44382] PHP Warning:  DOMDocument::loadXML(): Start tag expected, '&lt;' not found in Entity, line: 1 in /var/www/nw-page-editor/app/saveFile.php on line 49, referer: https://page-editor.acdh-dev.oeaw.ac.at/app/?f=lorem.xml&n=1
[Fri Apr 09 14:43:35.004937 2021] [php7:warn] [pid 26] [client 172.17.0.1:44382] PHP Warning:  XSLTProcessor::transformToXml() expects parameter 1 to be object, bool given in /var/www/nw-page-editor/app/saveFile.php on line 49, referer: https://page-editor.acdh-dev.oeaw.ac.at/app/?f=lorem.xml&n=1
[Fri Apr 09 14:43:35.004953 2021] [php7:warn] [pid 26] [client 172.17.0.1:44382] PHP Warning:  DOMDocument::loadXML(): Empty string supplied as input in /var/www/nw-page-editor/app/saveFile.php on line 50, referer: https://page-editor.acdh-dev.oeaw.ac.at/app/?f=lorem.xml&n=1
[Fri Apr 09 14:43:35.004960 2021] [php7:warn] [pid 26] [client 172.17.0.1:44382] PHP Warning:  XSLTProcessor::transformToXml() expects parameter 1 to be object, bool given in /var/www/nw-page-editor/app/saveFile.php on line 50, referer: https://page-editor.acdh-dev.oeaw.ac.at/app/?f=lorem.xml&n=1

==> access.log <==
172.17.0.1 - user1:NvDjj+FV [09/Apr/2021:14:43:34 +0000] "POST /app/saveFile.php HTTP/1.1" 200 59 "https://page-editor.acdh-dev.oeaw.ac.at/app/?f=lorem.xml&n=1" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"

Do you have an idea what could be causing this? Thanks in advance!

@mauvilsa
Copy link
Owner

This highly depends on directory user and group ownership and permissions inside your data directory. By default the docker container starts the apache server with the same user and group ids of the root data directory. This is so that apache has the right permissions. But if inside this directory there are more directories with different users or permissions then it can be that apache can't write. Alternatively you can start the container setting environment variables to specify user and group ids and umask, see https://github.com/mauvilsa/nw-page-editor#data-owner-group-and-permissions and https://github.com/mauvilsa/nw-page-editor/blob/master/web-app/start-server.sh#L11-L13.

Anyway after starting the container you could docker exec into it to check the things like the running user of apache, the permissions in the directory it is failing to write, etc.

This is the first thing that comes to my mind, though it could be something different. Without more information I am unable to tell.

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

2 participants