When I go to /admin/config/search/metatag i get 404 not found page. I unsinstalled and reinstalled metatag with composer.
I run Drupal 9.2.4, but it was the same on 9.2.2.

Comments

Grega created an issue. See original summary.

damienmckenna’s picture

Category: Bug report » Support request
Priority: Critical » Normal

Do you see the "Metatag" entry when you go to "admin/config/search" or is it missing? Are you using user 1 or a different user account that might not have the "administer meta tags" permission?

grega’s picture

Hy,

Yes there is a Metatg entry in admin/config/search
It does the same when I click it.
I am loged in with user 1

damienmckenna’s picture

What version of Drupal core are you using? Is your codebase fully up to date? What version of PHP is used and what is memory_limit set to?

d.sibaud’s picture

same behaviour:

  • core 9.2.4 (fully updated, just installed via composer)
  • "drupal/metatag": "^1.16"
  • php 7.4.22
  • memory_limit: 512M
roberto.muzzano’s picture

Hello!
Same problem here:

Server: NGINX 1.16.1
Php: 7.3.27
Drupal core: 9.2.5

Logged as user 1.

And if I try to add the metatag field in a content type, Drupal render a 404 page.

julliard’s picture

I hope this can help toward a final solution.
It's rather an nginx configuration issue.
I'got this piece of fonfiguration in my server bloc, that I had to deactivate for the admin page of metatag to re-appear.
Need more detailed answer not to expose those directories though.
Php, drupal and nginx throw no error.

# Protect files and directories from prying eyes.
location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.ph>
deny all;
return 404;
}

drupal-9.2.5
metatag-8.x-1.16
php7.4-fpm
nginx/1.18.0 (Ubuntu)
And I get the same 404 error with drupal8.9.18

gaurav.kapoor’s picture

I am able to access the Metatag configuration page with the following configuration:

Drupal-9.2.5
metatag-8.x-1.16
php7.4-fpm
nginx/1.18.0 (Ubuntu)

This doesn't look like a metatag module or Nginx config issue to me (Other configurations would have failed as well, if it was due to Nginx). I would recommend using this https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/ to set Nginx with Drupal correctly.

roberto.muzzano’s picture

@gaurav.kapoor
I already use the config file that you shared (https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/).

If remove this line configuration and restart nginx server, I'm able to see the config page:

location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|/(\.(?!well-known).*)|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config$|/#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$

So the problem is in that configuration for me, but why other modules config page works?

mfonseca_’s picture

Hi, we have the same problem.

Centos 7 x64
PHP Version 7.4.24-fpm
nginx/1.20.1
Drupal 7 (sorry, i don't have the admin privileges to see the exact version)

EDIT: The provider says that nginx is installed, not apache "human mistake"

deadcow’s picture

The "Tag" part in "...Repository|Root|Tag|Template..." is matching with the /admin/config/search/metatag path and goes into the 404 location.

It's there for a reason so I won't advise you to remove the "|Tag" part. Unless you want to.

bwaindwain’s picture

I was having the same 404 problems on my site but getting a copy of the latest recipe from the nginx wiki fixed it for me. Looks like the regex has been fixed.

https://github.com/nginxinc/nginx-wiki/commits/master/source/start/topic...

damienmckenna’s picture

Status: Active » Closed (cannot reproduce)

Seems like this is an infrastructure issue, rather than something with the module.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.