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

Undefined format_subdomain called at product_jqm2.pl line 128. #11287

Closed
monsieurtanuki opened this issue Jan 25, 2025 · 1 comment · Fixed by #11288
Closed

Undefined format_subdomain called at product_jqm2.pl line 128. #11287

monsieurtanuki opened this issue Jan 25, 2025 · 1 comment · Fixed by #11288

Comments

@monsieurtanuki
Copy link
Contributor

What

  • We cannot save some products in Smoothie because of a bug. Probably non food products, that would need redirection.
  • Looks like function format_subdomain is not reachable.
# There is an existing product
# If the product has a product_type and it is not the product_type of the server, redirect to the correct server
# unless we are on the pro platform

if (    (not $server_options{private_products})
	and (defined $product_ref->{product_type})
	and ($product_ref->{product_type} ne $options{product_type}))
{
	redirect_to_url($request_ref, 307,
		format_subdomain($subdomain, $product_ref->{product_type}) . '/cgi/product_jqm.pl?code=' . $code);
}

Part of

@teolemon
Copy link
Member

Aha @alexgarel , possibly an explainer beyond ssl or server latency

alexgarel pushed a commit that referenced this issue Jan 27, 2025
This pull request includes updates to the
`cgi/product_jqm_multilingual.pl` file, including a copyright year
update and an additional module import.

General updates:

*
[`cgi/product_jqm_multilingual.pl`](diffhunk://#diff-92f19641303749fe28f85e1fac66e3beb133831802fa003c74c4abec2c290b7dL6-R6):
Updated the copyright year from 2023 to 2025.

Code enhancements:

*
[`cgi/product_jqm_multilingual.pl`](diffhunk://#diff-92f19641303749fe28f85e1fac66e3beb133831802fa003c74c4abec2c290b7dR46):
Added `format_subdomain` from `ProductOpener::URL` to the list of
imported modules.

- Fixes #11287
@github-project-automation github-project-automation bot moved this from To discuss and validate to Done in 🍊 Open Food Facts Server issues Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants