Magento 2 store home page not displaying all of a sudden (other pages fine) and developer is asleep for the next 8 hours. Any help would be appreciated.

Basically the title, went into the admin and content config, saw homepage is enabled, no modifications in recent weeks, homepage just displays header.

We’re sorry an error occurred displaying this content message at the top.

Any tips to land this plane since the pilot is out in a coma?

submitted by /u/joevaded
[link] [comments]

502 bad gateway Magento nginx

This is the first time I am setting up magento with nginx and I am getting the following error when I try access : http:myip/setup 2023/07/20 14:28:36 [error] 163457#163457: *33 connect() to unix:/run/php/php8.1.sock failed (111: Connection refused) while connecting to upstream, client: 122.178.223.46, server: 127.0.0.1, request: "GET /setup/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1.sock:", host: "128.199.24.38" Don’t mind abou the disclosure of ip as its just for testing purpose. This is my nginx server block: “`upstream fastcgi_backend { server unix:/run/php/magento2.sock; }

server { listen 80; listen [::]:80; set $MAGE_ROOT /var/www/magento; set $MAGE_MODE default; index index.php index.html index.htm index.nginx-debian.html; server_name 127.0.0.1; include /var/www/magento/nginx.conf.sample; access_log /var/log/nginx/magento-access.log; error_log /var/log/nginx/magento-error.log; location ~ .php$ { try_files $uri =404; fastcgi_split_path_info .+php)(/.+)$; fastcgi_pass unix:/run/php/magento2.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }“` Php8.1-fpm is installed and running as well. This is my /var/www/magento/nginx.conf.sample file:

Example configuration:

upstream fastcgi_backend {

# use tcp connection

# server 127.0.0.1:9000;

# or socket

server unix:/var/run/php/php8.1.sock; # Update this to match your actual PHP-FPM socket path

}

server {

listen 80;

server_name mage.dev;

set $MAGE_ROOT /var/www/magento;

set $MAGE_DEBUG_SHOW_ARGS 0;

include /vagrant/magento2/nginx.conf.sample;

}

Optional override of deployment mode. We recommend you use the

command ‘bin/magento deploy:mode:set’ to switch modes instead.

set $MAGE_MODE default; # or production or developer

If you set MAGE_MODE in server config, you must pass the variable into the

PHP entry point blocks, which are indicated below. You can pass

it in using:

fastcgi_param MAGE_MODE $MAGE_MODE;

In production mode, you should uncomment the ‘expires’ directive in the /static/ location block

Modules can be loaded only at the very beginning of the Nginx config file, please move the line below to the main config file

load_module /etc/nginx/modules/ngx_http_image_filter_module.so;

root $MAGE_ROOT/pub; index index.php; autoindex off; charset UTF-8; error_page 404 403 = /errors/404.php;

add_header “X-UA-Compatible” “IE=Edge”;

Deny access to sensitive files

location /.user.ini { deny all; }

PHP entry point for setup application

location ~* /setup($|/) { root $MAGE_ROOT; location ~ /setup/index.php { fastcgi_pass unix:/run/php/php8.1.sock; # Update this to match your actual PHP-FPM socket path

 fastcgi_param PHP_FLAG "session.auto_start=off n suhosin.session.cryptua=off"; fastcgi_param PHP_VALUE "memory_limit=756M n max_execution_time=600"; fastcgi_read_timeout 600s; fastcgi_connect_timeout 600s; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ ^/setup/(?!pub/). { deny all; } location ~ ^/setup/pub/ { add_header X-Frame-Options "SAMEORIGIN"; } 

}

PHP entry point for update application

location ~* /update($|/) { root $MAGE_ROOT;

location ~ ^/update/index.php { fastcgi_split_path_info ^(/update/index.php)(/.+)$; fastcgi_pass unix:/run/php/php8.1.sock; # Update this to match your actual PHP-FPM socket path fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; include fastcgi_params; } # Deny everything but index.php location ~ ^/update/(?!pub/). { deny all; } location ~ ^/update/pub/ { add_header X-Frame-Options "SAMEORIGIN"; } 

}

location / { try_files $uri $uri/ /index.php$is_args$args; }

location /pub/ { location ~ /pub/media/(downloadable|customer|import|custom_options|theme_customization/.*.xml) { deny all; } alias $MAGE_ROOT/pub/; add_header X-Frame-Options “SAMEORIGIN”; }

location /static/ { # Uncomment the following line in production mode # expires max;

# Remove signature of the static files that is used to overcome the browser cache location ~ ^/static/versiond*/ { rewrite ^/static/versiond*/(.*)$ /static/$1 last; } location ~* .(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2|html|json|webmanifest)$ { add_header Cache-Control "public"; add_header X-Frame-Options "SAMEORIGIN"; expires +1y; if (!-f $request_filename) { rewrite ^/static/(versiond*/)?(.*)$ /static.php?resource=$2 last; } } location ~* .(zip|gz|gzip|bz2|csv|xml)$ { add_header Cache-Control "no-store"; add_header X-Frame-Options "SAMEORIGIN"; expires off; if (!-f $request_filename) { rewrite ^/static/(versiond*/)?(.*)$ /static.php?resource=$2 last; } } if (!-f $request_filename) { rewrite ^/static/(versiond*/)?(.*)$ /static.php?resource=$2 last; } add_header X-Frame-Options "SAMEORIGIN"; 

}

location /media/ {

The following section allows to offload image resizing from Magento instance to the Nginx.

Catalog image URL format should be set accordingly.

See https://docs.magento.com/user-guide/configuration/general/web.html#url-options

location ~* /media/catalog/.* {

# Replace placeholders and uncomment the line below to serve product images from public S3

# See examples of S3 authentication at https://github.com/anomalizer/ngx_aws_auth

# resolver 8.8.8.8;

# proxy_pass https://<bucket-name>.<region-name>.amazonaws.com;

set $width “-“;

set $height “-“;

if ($arg_width != ”) {

set $width $arg_width;

}

if ($arg_height != ”) {

set $height $arg_height;

}

image_filter resize $width $height;

image_filter_jpeg_quality 90;

}

try_files $uri $uri/ /get.php$is_args$args; location ~ ^/media/theme_customization/.*.xml { deny all; } location ~* .(ico|jpg|jpeg|png|gif|svg|svgz|webp|avif|avifs|js|css|eot|ttf|otf|woff|woff2)$ { add_header Cache-Control "public"; add_header X-Frame-Options "SAMEORIGIN"; expires +1y; try_files $uri $uri/ /get.php$is_args$args; } location ~* .(zip|gz|gzip|bz2|csv|xml)$ { add_header Cache-Control "no-store"; add_header X-Frame-Options "SAMEORIGIN"; expires off; try_files $uri $uri/ /get.php$is_args$args; } add_header X-Frame-Options "SAMEORIGIN"; 

}

location /media/customer/ { deny all; }

location /media/downloadable/ { deny all; }

location /media/import/ { deny all; }

location /media/custom_options/ { deny all; }

location /errors/ { location ~* .xml$ { deny all; } }

PHP entry point for main application

location ~ /(index|get|static|errors/report|errors/404|errors/503|health_check).php$ { try_files $uri =404; fastcgi_pass unix:/run/php/php8.1.sock; # Update this to match your actual PHP-FPM socket path fastcgi_buffers 16 16k; fastcgi_buffer_size 32k;

fastcgi_param PHP_FLAG "session.auto_start=off n suhosin.session.cryptua=off"; fastcgi_param PHP_VALUE "memory_limit=756M n max_execution_time=18000"; fastcgi_read_timeout 600s; fastcgi_connect_timeout 600s; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; 

}

gzip on; gzip_disable “msie6”;

gzip_comp_level 6; gzip_min_length 1100; gzip_buffers 16 8k; gzip_proxied any; gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss image/svg+xml; gzip_vary on;

Banned locations (only reached if the earlier PHP entry point regexes don’t match)

location ~* (.php$|.phtml$|.htaccess$|.htpasswd$|.git) { deny all; }

I am trying in debian 11. How to resolve this?

submitted by /u/Neither_Wallaby_9033
[link] [comments]

How to stop Anchor Categories from displaying subcategories products?

In magento 2.4.5, if a parent category is an anchor. And a subcategory has product. Then that product automatically shows in the parent category. Even though the product is not checked off in the parent category. Is there any way to stop this default behavior? Because we don’t want to show some products in parent category and only show them in subcategories.

But we need layered navigation, so we set parent category as an anchor.

or is it possible to make the parent category NOT an Anchor, but display layered navigation.

Thanks in Advance.

submitted by /u/Technasium
[link] [comments]

Importing youtube videos

Can it really be true, that there is no way to import youtube video’s?

One of my clients is in the process of changing all their products away from some shitty custom product type to configurable products. In the process I noticed when we import their products files to add the new products, the youtube video is not imported. it seems seriously stupid and like a huge missing feature for import functionality?

Anyone managed to find a good solution for this, so my client dont have to add 1000 youtube vidoes again, manually?

submitted by /u/Moist-Economics-9930
[link] [comments]

SEO Tips for Magento 2 Product Pages and Settings #2

Harness the power of keyword research

Keyword research is crucial for driving organic traffic to your Magento store. Here’s why it matters and two fantastic tools to help you get started:

The power of keywords: Keywords are the foundation of successful SEO. They connect your products with potential customers searching for them. Using relevant keywords strategically boosts your visibility in search results.

The challenge of keyword research: For SEO beginners, identifying the right keywords can be daunting. But fear not! Keyword research tools come to the rescue, making the process easier and more effective. I have two tools that I use regularly:

  • Google AdWords Keyword Tool: This free tool from Google provides valuable insights into keyword search volume, competition, and related terms. It’s an excellent starting point to discover relevant keywords for your products.

  • Keywordtool.io: This versatile tool offers keyword suggestions from various sources, including Google, Bing, and YouTube. It provides long-tail keywords and even questions that users might ask, helping you target specific customer queries.

=> How to use them: Enter relevant product-related terms into these tools, and they will generate a list of potential keywords. Focus on high-volume and low-competition keywords to optimize your product pages effectively.

Combine short-tail keywords (generic terms with high search volume) with long-tail keywords (more specific phrases) (*this keyword have to same intent*)

🔍 Stay relevant and monitor: Keep an eye on your competitors and industry trends to ensure your chosen keywords remain relevant.

What do you think? Share the way you do keyword research!

submitted by /u/samng89
[link] [comments]

Tips for Magento 2 Product Pages and Settings #1

Don’t fall into the duplicate content trap!

Avoid duplicate content on your Magento 2 product pages to maintain search engine credibility and attract more visitors. When multiple versions of the same page exist with slight variations in URLs or parameters, it can confuse search engine spiders. Here’s how to tackle it:

– Use canonical tags: Implement canonical tags to specify the preferred URL for search engines, consolidating the variations into one authoritative page.

– Set up URL parameters correctly: Ensure that URL parameters like sorting or pagination don’t create duplicate content. Use proper pagination tags and specify parameter handling in Google Search Console.

– Optimize meta tags: Craft unique and descriptive meta titles and descriptions for each product page. Avoid duplicating them across different variations.

– Enable product page filters: Implement user-friendly filters to enhance the browsing experience. Ensure that filter URLs don’t generate duplicate content.

– Leverage structured data: Implement structured data markup, such as schema.org, to provide search engines with clear information about your products and differentiate them from duplicates.

– Monitor crawl errors: Regularly check Google Search Console for crawl errors and address them promptly. Fixing broken links and resolving indexing issues helps maintain a healthy site structure.

– Prioritize unique content: Invest in high-quality, original product descriptions, images, and reviews to differentiate your pages from competitors and avoid duplicate content issues.

– Utilize URL rewrites: Create SEO-friendly URLs that accurately represent your products and avoid automatically generated URLs with unnecessary parameters.

– Stay vigilant with redirects: When necessary, set up proper 301 redirects from duplicate URLs to the canonical version to consolidate link equity and ensure a seamless user experience.

submitted by /u/samng89
[link] [comments]

USPS First Class Mail was depreciated Jul 9th. No patch? Nobody is able to ship First Class Mail?

Depreciated USPS Shipping methods; new USPS Ground Advantage method #37742

From what I can see, there has been no patch released to support USPS’s depreciation of First Class Mail and other services. They have been grouped together to a service called “USPS Ground Advantage”. Magento has no support for this shipping method.
What are you guys doing to work around this?

submitted by /u/sonicode
[link] [comments]

Magento 2.4.0 installation with elasticsearch on centos 7

I am having challenges installing magento 2.4.0 with php 7.3.33 on Centos 7.

I am stuck at getting elasticsearch to work, when I start elasticsearch service it says “Job for elasticsearch.service failed because the control process exited with error code. See “systemctl status elasticsearch.service” and “journalctl -xe” for details.”

submitted by /u/FarCauliflower5810
[link] [comments]