openfoodfacts / openfoodfacts-androidapp

(Legacy) Native version of Open Food Facts on Android - Coders & Decoders welcome 🤳🥫
https://android.openfoodfacts.org
Apache License 2.0
772 stars 446 forks source link

Fix packager-codes URL #3949

Closed gargomoma closed 3 years ago

gargomoma commented 3 years ago

Describe the bug Hey, there is a problem when opening the 'Traceability Code' link while checking a product.

To Reproduce Steps to reproduce the behavior:

  1. Go to Product Page
  2. Click on the 'Traceability Code' link
  3. Browser will open
  4. See error.

Expected behavior Instead of: https://world.openfoodfacts.org/packager-code/fsc-c014047

The generated URL is: https://world.openfoodfacts.org/packager-code/https://world.openfoodfacts.org/packager-code/fsc-c014047

Smartphone (please complete the following information):

teolemon commented 3 years ago

https://github.com/openfoodfacts/openfoodfacts-androidapp/blob/1b3956398d8f81838d7a9f2fd67a0a2b53f5c906/app/src/main/java/openfoodfacts/github/scrachx/openfood/network/services/ProductsAPI.kt#L233

VaiTon commented 3 years ago

@GET("packager-code/{packager_code}.json")

This is actually unused. I don't think that's the problem.