I uninstall and reinstalled many times but bug is still there :
in config, node, taxonomy and user appear as "unknown" and if i try to create a new one, the "select" menu is empty.
All idea will be welcome..
Thanks

Files: 
CommentFileSizeAuthor
#15 metatag.png22.63 KBvarsharani
#13 screen.png66.25 KBolofjohansson
#6 metatag.png12.14 KBMitsuko

Comments

ibedoya’s picture

I have the same problem. I want to update from beta4 to beta7, but I can't for this issue.
I didn't test a lot on non production environment, only I tried to upgrade and i got some metatags as Unknown:

  • Global
    • Global: Front page
    • Unknown (node)
      • Unknown (node): Unknown (article)
    • Unknown (taxonomy_term)
    • Unknown (user)

And as emicoma said the select menu is empty when I try to add a new one.

Regards.

DamienMcKenna’s picture

Status:Active» Postponed (maintainer needs more info)

Please check to see if you have any additional modules that implement either hook_metatag_config_instance_info() or hook_metatag_config_instance_info_alter(), an out-of-date module might be interfering with Metatag.

ibedoya’s picture

I have only metatag_metatag_config_instance_info() and metatag_views_metatag_config_instance_info() that implement the hook. All metatag modules are updated and I dont have any other module that implements that hook or other metatag hook. I mean I have no modules that implement hooks from metatag module except metatag sub-modules but I only have metatag module enabled, I mean I have no more metatag modules enabled, only the metatag 'core'.

Thanks.

ibedoya’s picture

Status:Postponed (maintainer needs more info)» Active
emicoma’s picture

Problem still alive..
No other module with hook_metatag_config_instance_info() or hook_metatag_config_instance_info_alter()
Another solution to try ?
thanks..

Mitsuko’s picture

StatusFileSize
new12.14 KB

The same here... Everything was working and my local machine, after migration on a remote server, I get the "Unknown" bug. Read this issue, update to 7.x-1.x., flush caches, but the problem was still here. tried to uninstall and install again without success.
help would be much appreciated.

Thanks

DamienMcKenna’s picture

Status:Active» Postponed (maintainer needs more info)

Did you upgrade from D6, by any chance?

DamienMcKenna’s picture

Also, what version of PHP are you using?

guitarma’s picture

I am ripping my hair out trying to figure this out! I have not even upgraded my Drupal, I just cannot, for the life of me get Metatags to appear in my nodes. I have installed it on one computer without any issues at all. But on my laptop there are no default settings for Metatag. And when I attempt to add a default, I get this:
PDO Exception: SQLSTATE[4502]: Base table or view not found: 1146 Table (databasename)_db.metatag_config' doesn't exist: INSERT INTO {metatage_config} (instance, config) VALUES (:db_insert_placeholder_0)...... etc... etc...

DamienMcKenna’s picture

@guitarma: If you don't have a table named 'metatag_config' please uninstall the module and reinstall it, that's a required table.

DamienMcKenna’s picture

.. of course if you've running from a copy of another site then you may want to make sure both the {metatag} and {metatag_config} tables were copied too.

olofjohansson’s picture

I had the same problem. No other modules implementing any of the mentioned hooks, and the only enabled module that's related to metatags was the core metatag module.

The problem disappeared when I truncated the cache_metatag table.

Update:
After some more research, I've figured out that the cache with the ID metatag:config:instance:info:en gets built differently at some times. I've enabled the metatag_opengraph module, which causes the cache_metatag table to be emptied. When I reload the metatag configuration page, the problem appears. Then, I truncated the cache_metatag table, reloaded the page, and the problem was gone. The only difference was the value for the metatag:config:instance:info:en cache.

Invalid value:

Array
(
    [global] => Array
        (
            [label] => Global
        )

    [global:frontpage] => Array
        (
            [label] => Front page
        )

)

Valid value:

Array
(
    [global] => Array
        (
            [label] => Global
        )

    [global:frontpage] => Array
        (
            [label] => Front page
        )

    [node] => Array
        (
            [label] => Node
        )

    [node:about_text] => Array
        (
            [label] => About text
        )

    [node:backdrop] => Array
        (
            [label] => Backdrop
        )

    [node:blog_post] => Array
        (
            [label] => Blog post
        )

    [node:case] => Array
        (
            [label] => Case
        )

    [node:client] => Array
        (
            [label] => Client
        )

    [node:contact] => Array
        (
            [label] => Contact
        )

    [node:front_slide] => Array
        (
            [label] => Front slide
        )

    [node:notice] => Array
        (
            [label] => Notice
        )

    [node:service] => Array
        (
            [label] => Service
        )

    [file] => Array
        (
            [label] => File
        )

    [file:image] => Array
        (
            [label] => Image
        )

    [file:video] => Array
        (
            [label] => Video
        )

    [file:audio] => Array
        (
            [label] => Audio
        )

    [file:document] => Array
        (
            [label] => Document
        )

    [user] => Array
        (
            [label] => User
        )

)

Update 2: I'm using Features to store the configuration. Haven't tried this behavior without it.

olofjohansson’s picture

Status:Postponed (maintainer needs more info)» Active
StatusFileSize
new66.25 KB

Seems to be caused by Entityforms (both 1.x and 2.x). Don't know if this issue should be moved to that module yet, will investigate further.

Steps to reproduce:

  • Install Drupal 7.23 with the standard profile
  • Enable Metatag module
  • Enable Entityforms module
  • Create a new entityform type
  • Clear all cache
  • Visit the configuration page for metatag. Node, User and Taxonomy should appear like Unkown (entity-type). See the attached screenshot.

The crucial step is to create a new entityform type. Without an entityform type everything still works as it should.

olofjohansson’s picture

I don't think this is Entityforms fault. Entityforms implements hook_entity_info_alter() which calls entityform_get_types(), which calls entity_load_multiple_by_name(). I tried to comment out the last call, and everything worked.

I've also noticed that it only happens if you clear the cache via Drush or Administration menu, and the first page you land on is the Metadata configuration page. If I clear the cache via Drush, visit any other page, and then visit the Metadata configuration, everything works.

It has to have something to do with the entity cache. Honestly, this is starting to get to complex for me.

varsharani’s picture

Title:No way to create default metatag» No way to create new default metatag
StatusFileSize
new22.63 KB

I have same issue. I repaire & optimise table from database but I experienced that some meta tag issue. I can't add meta tag while creating the node content.
I attached screenshot also.

denislaliberte’s picture

subscribe

Dave Reid’s picture

@olofjohansson That sounds *exactly* like it's Entityforms fault by your description, because it would mean it's breaking hook_entity_info() and would explain why the defaults look so messed up on the Metatag config page. I filed #2130131: Triggering an entity_load() from entityform_entity_info_alter() causes all sorts of problems as a bug against Entityforms.

tedbow’s picture

I have created a patch on related #2130131: Triggering an entity_load() from entityform_entity_info_alter() causes all sorts of problems

I haven't read through this issue but referenced issue is definitely a problem with Entityform.

tedbow’s picture

FYI, I made new releases for Entityform that fixes this issue.

Mitsuko’s picture

I don't use entityform module but I still have this bug.
My php version is 5.3.10-1ubuntu3.8 and it's a site started width drupal 7 (no upgrade from 6.x to 7.x).

DamienMcKenna’s picture

Mitsuko: Have you created any custom entity types on you site via code, or are you using any modules that create new entity types beyond what comes in core?

cameronbprince’s picture

I triggered this problem when I was experimenting with hook_metatag_config_default() in my own module. Even after disabling my module and clearing cache, normal behavior wasn't restored. I ended up restoring my database to recover. It's definitely data-related.

I don't use entityform and the entity I'm working with is a standard node.

EDIT: To follow-up on this, the cause in my case was calling hook_metatag_config_default() from within my .module file rather than in an include file.

rag_gupta’s picture

Title:No way to create new default metatag» Unknown (taxonomy_term/node )- No way to create new default metatag
Issue summary:View changes

Everybody will search using Unknown .. so it should be in the title. I've spent some time to reach this post.

rag_gupta’s picture

Subscribing

MXT’s picture

Version:7.x-1.0-beta7» 7.x-1.0-beta9

I have the same issue using latest metatag version.

What is strange: if I RESAVE the front page meta tag settings, all things return right ("unknown" disappear)

DamienMcKenna’s picture

Title:Unknown (taxonomy_term/node )- No way to create new default metatag» "Unknown taxonomy_term" or "Unknown node" - No way to create new default metatag
Parent issue:» #1269728: META: Plan for Metatag 7.x-1.0 release

Lets try to get this fixed for 1.0.

tobiberlin’s picture

Hey,

I have the same issue. All I did was experimenting with one custom token. After clearing all caching the issue appeared. After resaving the front page global "Unknown" disappears. At least it was just a kind of "aesthetic" problem to me as I was till able to override nodes metatag settings.

Best,
Tobias

grotter’s picture

Just letting everyone know that I came across the same problem and narrowed down the issue to some custom, totally unrelated code throwing PHP warnings (I hadn't properly enclosed a constant definition in quotes). I'm sure this problem is PHP-version dependent, so it may only crop up in certain environments.

I ended up fixing the issue by correcting the faulty code, then uninstalling / reinstalling the module, which unfortunately means I lost all configuration and override settings.

DamienMcKenna’s picture

I ran into this myself recently when I was fiddling with hook_metatag_config_default_alter() because I was modifying the data structure in a way I shouldn't have, once I fixed my custom code problem the oddity went away.

DamienMcKenna’s picture

DamienMcKenna’s picture

Version:7.x-1.0-beta9» 7.x-1.x-dev
Component:User interface» Documentation
Priority:Major» Normal

Demoting this, it seems like the problem is triggered by custom code that's accidentally borking something Metatag expects to be a certain way; I think it'd be worth documenting for developers the fact that it's caused by custom code, so I'm leaving it open and changing it to a Documentation issue.

DetectivePixel’s picture

#27 was the solution for me.

Cleared Cached, edit metatag Node clicked save. Problem solved.

lstk’s picture

我也遇到了这个问题。我的解决方法是重启服务器就好了,我的服务器环境是ubuntu+nginx。
I have same issue.I restart my server to solved the problem.

DamienMcKenna’s picture

Component:Documentation» User interface
Priority:Normal» Minor

So, as I have been suspecting, it seems that custom code is to blame for the UI behaving oddly. I'm going to leave this as a UI bug because it'd be nice to identify the cause of the problem and warn the site builder, rather than allowing the UI to break.

DamienMcKenna’s picture

Status:Active» Postponed (maintainer needs more info)

This can happen if something's wrong with the entity configurations and the Metatag support is not enabled properly. Please test the latest -dev release (or 1.5, due today) and let me know if the problem persists.

himanshupathak3’s picture

Problem persists still after updating metatag module to the latest stable release

himanshupathak3’s picture

Taxonomy vocabularies are coming unchecked by default. The case is I have 2 vocabularies which are customized. When I installed the latest stable release, those vocabularies should be checked by default, which was not happening, so it was showing them to be "unknown". Checking those customized vocabularies and saving the config form Fixed my problem, but it should be in code so that it updates them automatically after running update.php.date.php.

DamienMcKenna’s picture

@himanshupathak3: I'm working on an improvement for the logic around which entities are enabled by default: #2499865: Auto-disable more entities Glad to know that this is at least resolving your problem, hopefully it'll do likewise for others.