1

I am facing an issue where if i update few information such as meta title, meta keywords, meta description from admin panel for any category, then the meta title is not getting saved to database.

According to my database the attribute id for meta title is 49 enter image description here

Now, if i use a category with id 589 and try to update the contents, the data is reflected as displayed in the below tables.

enter image description here

Table : catalog_category_entity_varchar enter image description here

Table : catalog_category_entity_text enter image description here

I have Tried using a logger in Magento\Catalog\Controller\Adminhtml\Category\Save.php before & after the category is saved. Below is the log:

2019-06-14T08:18:58+00:00 INFO (6): Magento\Catalog\Controller\Adminhtml\Category\Save

2019-06-14T08:18:58+00:00 INFO (6): +++++++++++++++++ Print before save +++++++++++++++++
2019-06-14T08:18:58+00:00 INFO (6): array (
  'store_id' => '0',
  'entity_id' => '589',
  'attribute_set_id' => '3',
  'parent_id' => '168',
  'created_at' => '2012-05-03 23:06:52',
  'updated_at' => '2019-06-14 07:39:39',
  'path' => '1/2/168/589',
  'position' => '3',
  'level' => '3',
  'children_count' => '3',
  'description' => '',
  'meta_keywords' => 'yyyyy',
  'meta_description' => 'zzzzzz',
  'custom_layout_update' => '',
  'available_sort_by' => NULL,
  'is_active' => '1',
  'landing_page' => '',
  'is_anchor' => '0',
  'include_in_menu' => '1',
  'custom_use_parent_settings' => '1',
  'custom_apply_to_products' => '1',
  'filter_price_range' => NULL,
  'name' => 'Alpaca',
  'meta_title' => 'xxxxx',
  'display_mode' => 'PRODUCTS',
  'custom_design' => '',
  'page_layout' => '',
  'url_key' => 'alpaca',
  'url_path' => 'fiber/alpaca',
  'custom_design_from' => 'Invalid date',
  'custom_design_to' => 'Invalid date',
  'path_ids' => 
      array (
         0 => '1',
         1 => '2',
         2 => '168',
         3 => '589',
      ),
  'use_config' => 
      array (
        'available_sort_by' => true,
        'default_sort_by' => true,
        'filter_price_range' => true,
      ),
   'id' => '',
   'parent' => '0',
   'umm_dd_width' => '',
   'umm_dd_proportions' => '',
   'umm_cat_target' => '',
   'url_key_create_redirect' => 'alpaca',
   'umm_dd_block_top' => '',
   'umm_dd_block_left' => '',
   'umm_dd_block_right' => '',
   'umm_dd_block_bottom' => '',
   'default_sort_by' => NULL,
   'umm_dd_type' => '0',
   'umm_dd_columns' => '',
   'umm_cat_label' => '',
   'form_key' => 'NWHGbfi0uj66aF21',
   'image' => false,
   'save_rewrites_history' => true,
   )

2019-06-14T08:18:58+00:00 INFO (6): +++++++++++++++++ Print after save +++++++++++++++++

2019-06-14T08:18:58+00:00 INFO (6): array (
  'store_id' => '0',
  'entity_id' => '589',
  'attribute_set_id' => '3',
  'parent_id' => 168,
  'created_at' => '2012-05-03 23:06:52',
  'updated_at' => '2019-06-14 08:18:58',
  'path' => '1/2/168/589',
  'position' => '3',
  'level' => '3',
  'children_count' => '3',
  'description' => NULL,
  'meta_keywords' => 'yyyyy',
  'meta_description' => 'zzzzzz',
  'custom_layout_update' => '',
  'available_sort_by' => NULL,
  'is_active' => '1',
  'landing_page' => NULL,
  'is_anchor' => '0',
  'include_in_menu' => '1',
  'custom_use_parent_settings' => '1',
  'custom_apply_to_products' => '1',
  'filter_price_range' => NULL,
  'name' => 'Alpaca',
  'meta_title' => NULL,
  'display_mode' => 'PRODUCTS',
  'custom_design' => '',
  'page_layout' => '',
  'url_key' => 'alpaca',
  'url_path' => 'fiber/alpaca',
  'custom_design_from' => '0000-00-00 00:00:00',
  'custom_design_to' => '0000-00-00 00:00:00',
  'path_ids' => 
  array (
     0 => '1',
     1 => '2',
     2 => '168',
     3 => '589',
  ),
  'use_config' => 
  array (
    'available_sort_by' => true,
    'default_sort_by' => true,
    'filter_price_range' => true,
  ),
  'id' => '',
  'parent' => '0',
  'umm_dd_width' => '',
  'umm_dd_proportions' => '',
  'umm_cat_target' => '',
  'url_key_create_redirect' => 'alpaca',
  'umm_dd_block_top' => '',
  'umm_dd_block_left' => '',
  'umm_dd_block_right' => '',
  'umm_dd_block_bottom' => '',
  'default_sort_by' => NULL,
  'umm_dd_type' => '0',
  'umm_dd_columns' => '',
  'umm_cat_label' => '',
  'form_key' => 'NWHGbfi0uj66aF21',
  'image' => false,
  'save_rewrites_history' => true,
  'is_changed_product_list' => false,
 )

Can anybody tell what can be the issue. And sometimes the attribute (id 49) Meta title itself is not inserted into the table catalog_category_entity_varchar.

Please help.

2
  • Hi, did you solve this? Jul 11 '19 at 18:04
  • Hi Simon, i created a new category attribute called meta_title and imported the old data from catalog_category_entity_varchar table and added to the new attribute. It is working now, however i was not able to find why the meta title was not saving in the first place. I will provide more detailed answer soon. Jul 17 '19 at 8:20
1

In my case description was not getting saved. I have checked eav_attribute table for description attribute and I found id 47 then I have checked catalog_eav_attribute and eav_entity_attribute tables and i found description attribute id was missing in these tables therefore category description is not getting saved to database.

0

I checked and found attribute id of meta title, meta description and meta keywords is not available in eav_entity_attribute and catalog_eav_attribute table.

I find meta_title, meta_keywords and meta_description key values in table eav_entity_attribute found id like -

49 - meta_title 50 - meta_keywords 51 - meta_description

  1. eav_entity_attribute

    I added below values under eav_entity_attribute table -

    (49, 3, 3, 4, 49, 6), (50, 3, 3, 4, 50, 7), (51, 3, 3, 4, 51, 8);

  2. catalog_eav_attribute -

    I added below values under catalog_eav_attribute table-

    (49, NULL, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL),

    (50, NULL, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL),

    (51, NULL, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 1, NULL);

first check both table if those values is not available so add it. I added/created above values under eav_entity_attribute and catalog_eav_attribute table. after that run php bin/magento setup:upgrade then found it saving values under category section for meta title, meta description and meta keywords.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.