Browser interface broken after incorrect setting change

Questions, comments, discussions. Over time certain topics might be moved to their own category.
Post Reply
michel
Posts: 6
Joined: Thu Feb 18, 2021 8:34 pm

Browser interface broken after incorrect setting change

Post by michel »

Hi,

Spent last week installing, setting up and populating Mayan for the first time. Today I tried to setup email which worked fine. However, the info in the mail and link to the document were incorrect. Found this topic viewtopic.php?t=1240 and changed accordingly.

This fixed the issue partly (see below) but the link to the document was still incorrect. I then saw another setting in the 'Common' section of Settings. It was at the bottom/last one and said something like 'Document View Path'. It had an empty value ''. I thought, well document view, that's what I want the person I send the mail to to be able to do. Let's give it a try. So I changed that to my host address (because the value below also had a host address part) which was a terrible mistake. Result is that I have no access to Mayan anymore. I get something like 'page not found'. As a result I'm not able to change this setting back to the original null value.

This is a docker-compose install and I spent all evening trying to figure out how to edit a file in a docker-compose container. Unfortunately I didn't succeed. And after that I still need the name/location of the 'Common' yml file to change it back. And after that I still need to figure out the original problem why the doclink is incorrect.

Hope someone at the forum can point me in the right direction.

Thanks a bunch.

----email contents-----
To access this document click on the following link: https://www.mayan-edms.com/documents/do ... 6/preview/ -------- This email has been sent from Mayan at Boskant (http://<the correct (my) host address>)
michel
Posts: 6
Joined: Thu Feb 18, 2021 8:34 pm

Re: Browser interface broken after incorrect setting change

Post by michel »

Hi again,

I found a way into the running mayanedms docker container. But now I need to find the file where the setting is that I changed inadvertently.

Since I cannot remember the setting name and I can't look it up, could someone please go into their settings and tell me what the last setting of the COMMON category is? If I remember correctly it has 7 settings. It was something with 'document', 'view' and 'path'.

With the setting name I may be able to locate the file where it has been defined and change it back to the original null value.

Thanks a bunch.
michel
Posts: 6
Joined: Thu Feb 18, 2021 8:34 pm

Re: Browser interface broken after incorrect setting change

Post by michel »

Ok, by scanning all settings files I found "./lib/python3.7/site-packages/mayan/apps/common/settings.py" that contains the 7 settings including the ones I changed succesfully (DEFAULT_COMMON_PROJECT_TITLE, DEFAULT_COMMON_PROJECT_URL) before.

The last one is called "DEFAULT_COMMON_URL_BASE_PATH". I used the instructions here: https://docs.mayan-edms.com/chapters/settings.html to override it with: export MAYAN_DEFAULT_COMMON_URL_BASE_PATH="''" (single quotes enclosed in double quotes because single quotes was the original value).
Then stopped/restarted the docker container called mayan_app_1. Unfortunately still no luck. Opening Mayan through browser still causes "Page not found :: Mayan EDMS" in the browser tab title. The browser window is entirely blank, only an error message in Chrome's tab title.

I found a reference to a 'management command' 'revertsettings'. But I have no clue how I can run it. I tried:
- within the container (docker exec -it 4d69 /bin/bash) enter 'revertsettings'
- within the container (docker exec -it 4d69 /bin/bash) enter 'run_command revertsettings'
- outside the docker container: docker exec -it 4d69 revertsettings
- outside the docker container: docker exec -it 4d69 run_command revertsettings

All ended up with 'executable file not found'.

I'm running out of ideas. Please someone give me a clue how to proceed.

Thanks.
michel
Posts: 6
Joined: Thu Feb 18, 2021 8:34 pm

Re: Browser interface broken after incorrect setting change

Post by michel »

Well, for the sake of anyone else making such an unfortunate mistake.................

Just add MAYAN_COMMON_URL_BASE_PATH: "''" to the environment section of docker-compose.yml. This overrides the value of the variable I changed to some catastrophic value.

If you know how it works it is so simple...............

Cheers...........
Post Reply