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

Superuser can't access the action menu (3 vertical dots) on any recipe #2863

Closed
pascalxricher opened this issue Jan 5, 2024 · 12 comments
Closed
Labels
setup issue possibly or definitely an issue with the user setup

Comments

@pascalxricher
Copy link

Tandoor Version

Dec 3 commit abf8f79

Setup

Docker / Docker-Compose

Reverse Proxy

Others (please state below)

Other

Login Portal (Synology Reverse Proxy)

Bug description

I installed Tandoor using Portainer (docker-compose), and the installation completed successfully. When I access Tandoor for the first time, I get asked to create a superuser, which I do.

The authentication with the superuser credentials is then successful, and I can create a new recipe using the dropdown menu in the top banner. The recipe gets created without a problem.

I can then search for the recipe, and access it, no problem... Once in the recipe, I don't have access to the "three vertical dots" (I don't see it) to edit or delete the newly created recipe.

If I access to the Users menu, in the Admin feature, I can see that this user is active, and is flagged as a superuser.

Any idea what it could be ?

docker-compose

version: "3.9"
services:
  tandoor:
    image: vabene1111/recipes:latest
    container_name: Tandoor
    hostname: tandoor
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:8080 || exit 1
    user: 1026:100
    volumes:
      - /volume1/docker/tandoor/staticfiles:/opt/recipes/staticfiles
      - /volume1/docker/tandoor/mediafiles:/opt/recipes/mediafiles
      - /volume1/docker/tandoor/nginx:/opt/recipes/nginx/conf.d
    env_file:
      - stack.env
    restart: always

  nginx:
    image: nginx:mainline-alpine
    container_name: Tandoor-NGINX
    hostname: nginx-tandoor
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost:80 || exit 1
    volumes:
      - /volume1/docker/tandoor/staticfiles:/static:ro
      - /volume1/docker/tandoor/mediafiles:/media:ro
      - /volume1/docker/tandoor/nginx:/etc/nginx/conf.d:ro
    ports:
      - 9815:80
    env_file:
      - stack.env
    restart: always

NGINX tandoor.conf

server {
  listen 80;
  server_name localhost;

  client_max_body_size 128M;

  # serve media files
  location /media/ {
    alias /media/;
  }
  # pass requests for dynamic content to gunicorn
  location / {
    proxy_set_header Host $http_host;
    proxy_pass http://tandoor:8080;

    error_page 502 /errors/http502.html;
  }

  location /errors/ {
    alias /etc/nginx/conf.d/errorpages/;
    internal;
  }
}

Environment variables

DEBUG=0
SQL_DEBUG=0
ALLOWED_HOSTS=
SECRET_KEY=my-32-caracters-string
TIMEZONE=America/Montreal
DB_ENGINE=django.db.backends.postgresql
POSTGRES_HOST=192.168.86.40
POSTGRES_PORT=2665
POSTGRES_USER=tandoor
POSTGRES_PASSWORD=my-db-password
POSTGRES_DB=tandoor
FRACTION_PREF_DEFAULT=0
COMMENT_PREF_DEFAULT=1
SHOPPING_MIN_AUTOSYNC_INTERVAL=5
GUNICORN_MEDIA=0
REVERSE_PROXY_AUTH=0
ENABLE_PDF_EXPORT=1
EXPORT_FILE_CACHE_DURATION=600

Relevant logs

No response

@smilerz
Copy link
Collaborator

smilerz commented Jan 5, 2024

clear the browser cache and confirm that there are no errors in the browser console.

@pascalxricher
Copy link
Author

pascalxricher commented Jan 5, 2024

Thanks @smilerz, there's definitely an error in the Browser console when I access a recipe... here it is:

started loading locale messages

recipe_view.b1660b4e26b3.js:1 finished loading messages in  15  ms

chunk-vendors.26d1c55123d2.js:1054 TypeError: window.Urls[e] is not a function
    at x (recipe_view.b1660b4e26b3.js:1:53564)
    at a.resolveDjangoUrl (recipe_view.b1660b4e26b3.js:1:53455)
    at a (recipe_view.b1660b4e26b3.js:1:106047)
    at t._render (chunk-vendors.26d1c55123d2.js:1054:20103)
    at a.r (chunk-vendors.26d1c55123d2.js:1054:24095)
    at t.get (chunk-vendors.26d1c55123d2.js:1054:33537)
    at new t (chunk-vendors.26d1c55123d2.js:1054:33450)
    at Dn (chunk-vendors.26d1c55123d2.js:1054:24188)
    at oo.$mount (chunk-vendors.26d1c55123d2.js:1054:82127)
    at oo.$mount (chunk-vendors.26d1c55123d2.js:1054:107882)

I also see this warning:

Manifest: Enctype should be set to either application/x-www-form-urlencoded or multipart/form-data. It currently defaults to application/x-www-form-urlencoded /manifest.json:1

Does it ring a bell ?!

@smilerz
Copy link
Collaborator

smilerz commented Jan 5, 2024

Do you have another proxy sitting in front of nginx?

@pascalxricher
Copy link
Author

The standard Synology Reverse Proxy is configured like this:

https://recipe.xxx.xxx --> http://192.168.86.40:9815

@smilerz
Copy link
Collaborator

smilerz commented Jan 5, 2024

@RobbyRash
Copy link

I am seeing the exact same issue. New install with the same browser errors in the console. Is this a bug? If not, how can I resolve this?

@smilerz smilerz added the setup issue possibly or definitely an issue with the user setup label Jan 6, 2024
@smilerz
Copy link
Collaborator

smilerz commented Jan 6, 2024

I am seeing the exact same issue. New install with the same browser errors in the console. Is this a bug? If not, how can I resolve this?

It's not a bug. It's a setup issue. You have put a proxy in front of Tandoor and probably not setup headers correctly.

@pascalxricher
Copy link
Author

I added the requested header, but it did not solve the issue... I'll try to troubleshoot it a bit later this week.

@RobbyRash
Copy link

I added the requested header, but it did not solve the issue... I'll try to troubleshoot it a bit later this week.

Same. If you find a resolve, could you please share?

@pascalxricher
Copy link
Author

Sure, I will...

I however saw last night that the Mealie Team has released a new stable version of their application with loads of bug fixes and features... Being an existing Mealie user that was looking for additional features, I'll give the new Mealie version a shot as the previous version was a breeze to install.

@RobbyRash
Copy link

Sure, I will...

I however saw last night that the Mealie Team has released a new stable version of their application with loads of bug fixes and features... Being an existing Mealie user that was looking for additional features, I'll give the new Mealie version a shot as the previous version was a breeze to install.

I went the same route. With lots of trial and error following the headers documentation, I'm trying the Mealie release. With the same setup and headers, it's working correctly. Thanks for the recommendation

@pascalxricher
Copy link
Author

I finally installed the latest version of Mealie, it installs correctly, and it's snappy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
setup issue possibly or definitely an issue with the user setup
Projects
None yet
Development

No branches or pull requests

3 participants