Tandoor recipes images not showing up

–I move my thread over from the support Forum where i placed this first by mistake.–

Hello dear Community! :slight_smile:

This is my first post here and I want to thank you all for this great project!
I really love it! :heart:

I’d love to contribute in one or another way in the future, but for now I’d appreciate if somebody could look into my Problem with Tandoor. :smiling_face_with_tear:

My YunoHost server

Hardware: ThinkCentre Tiny, 8th Gen Intel, Proxmox
YunoHost version: 11.2.21.2 (stable)
I have access to my server : Through SSH | through the webadmin | proxmox console
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : installed it on a debian VM in proxmox

Description of my issue

Its about the App Tandoor.

Everything seems to work exept the picture of the recipes are not loading.

Looks like this:

The Inspector of the site shows these information when clicking on the field with the missing picture:

<img data-v-302f2a18="" src="https://tandoor.krabi.noho.st/mediafiles/recipes/5a2a9cd3-c2dd-4cfb-a7b1-e19e6fa22391_2.png" id="id_image" class="img img-fluid img-responsive" style="object-fit: cover; height: 100%;">

I found similar issues on the Tandoor github here and here.

There it seems to be a problem with the nginx configuration or the recipes.conf file so that the path for the mediafiles may be incorrect.

I tried messing with this conf file, but could get the images to show up.

I found the file on the machine here:

root@krabi:/var/www/tandoor/source/mediafiles/recipes# ls
5a2a9cd3-c2dd-4cfb-a7b1-e19e6fa22391_2.png  abef4939-fe20-450c-9782-d500620a005a_3.jpg

And the recipe.conf file looks like this:

server {
  listen 80;
  listen [::]:80 ipv6only=on;
  server_name localhost;

  client_max_body_size 128M;

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

    error_page 502 /errors/http502.html;
  }

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

Can somebody put this puzzle together so the pictures are working again?

If you need further information feel free to ask!

Thank you very much in advance! :heart:

Hi moppel,

Welcome to the forums!

I’m no star with nginx configurations, but what I see is:

/var/www/tandoor/source/mediafiles/recipes

vs

  location /media/ {
    alias /opt/recipes/mediafiles/;

I’d try commenting out (#) or removing the alias /opt-line, and add the /var/www.. line instead. No guarantees, but it’s broken already, so… ¯\_(ツ)_/¯

Good luck!

1 Like

tried the url workaround which does not help…

Sorry for the late reply and thank you for your input!

My Recipes.conf looks like this now:

server {
  listen 80;
  listen [::]:80 ipv6only=on;
  server_name localhost;

  client_max_body_size 128M;

  # serve media files
  location /var/www/tandoor/source/mediafiles/

  # pass requests for dynamic content to gunicorn
  location / {
    proxy_set_header Host $http_host;
    proxy_pass http://web_recipes:8080;

    error_page 502 /errors/http502.html;
  }

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

But it does not seem to effect the location where it is searching for.

Code from Inspector on the webpage:

<img data-v-302f2a18="" src="https://tandoor.krabi.noho.st/media/recipes/abef4939-fe20-450c-9782-d500620a005a_3.jpg" id="id_image" class="img img-fluid img-responsive" style="object-fit: cover; height: 100%;">

a fix is available in testing. Please test and report
sudo yunohost app upgrade tandoor -u https://github.com/YunoHost-Apps/tandoor_ynh/tree/testing --debug

2 Likes

I’ll test later asap.

Thank you very much!

Thanx for that, all working with a fresh install!

1 Like

Same here.

With the command @ericg provided it updated and now its working.

Thank you very much!

The old recipes still do not show picture. But a freshly imported does.

Theres no need to investigate on my site, because i was still just testing.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.