Is this store level or global level?
Its global level. I just have one store. I made a subcategory of my root category and was trying to edit it but receiving the error i mentioned above.
Hi @adityag186
I cannot reproduce the issue on 2.1.
Is the error reproducible?
Is the category enabled?
What happens if you disable it, save, enable, save?
Thanks,
Kateryna.
Hi,
There are products in the category that I am trying to save.
I disabled it, then made changes and then i was getting error - "Something went wrong" while saving the category.
Hi @adityag186
There should be more details on the error you see in magento/var/log/exception.log or in apache/php error logs. Could you post the stack trace here?
I have the same issue after migration. _The value of attribute "is_active" must be set_ then if I don't get that error I get _URL key for specified store already exists._ I'm not exactly sure where I can look for duplicates in the database but I know that there is only one of that key visible in the backend and if I try to change the URL key to something completely different I know is not on the site, I still get the error.
Attached is my exception.log. exception.txt Hopefully it helps some.
Hi @brittany89
Could you post the result of this query from your database, please?
select ci.*
from catalog_category_entity_int as ci
join eav_attribute as ea on ci.attribute_id = ea.attribute_id
join eav_entity_type as et on ea.entity_type_id = et.entity_type_id
where ea.attribute_code = 'is_active' and et.entity_type_code = 'catalog_category'
catalog_category_entity_int.xlsx
Please let me know if you need a different format.
The format is good, thank you.
I am having the same issue, but I see the message only after I restart php7.0-fpm because after saving the category the admin is being stuck on loading.
My guess is have something to do with the number of the products from that category. If I try it the save on a category with a smaller number of products, it works just fine.
Mine has 14k+ products and I also have all the indexes set to Update by schedule but the problem persists.
Inspecting mysql log after hitting the save button the following queries seems to be repeated for each product:
log.txt
It seems that the url rewrites are still indexed.
Updated:
It seems that the problem is related to this call: $category->dataHasChangedFor('url_key') on https://github.com/magento/magento2/blob/develop/app/code/Magento/CatalogUrlRewrite/Observer/CategoryProcessUrlRewriteSavingObserver.php#L74
Because it always return true. It should not return true only if the url-key was not changed.
@florinserbu2 , Is there any fix for this issue, Me too struggling with the issue while saving category. For me URL is getting deleted in url_rewrite table while saving category but it is not regenerating the same.
I have also same problem "Something went wrong while saving the category"
Please provide some solution for it.
I am also having this problem. The issue is that sometimes it happens and sometimes not. Yesterday all was working fine, but today I suddenly get the error message. Nothing changed in the meanwhile...
@Yasp0 Can you print the Exception Message and check what error it is showing.
Thanks! I found some errormessage containing 'Asymmetric transaction rollback'. I resolved it with the following commands:
php bin/magento indexer:reindex
and
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf var/generation/*
Did anyone find a solution to the issue? I am getting an error like "The value of attribute "is_active" must be set" and also sometimes getting "URL key for specified store already exists" for categories.
Recently I have migrated data from Magento 1.9.1 to Magento 2.1.3.
I can also confirm the issue in Magento 2.1.1. Sometimes it says
The value of attribute "is_active" must be set.
or
URL key for specified store already exists.
or both while saving the product.
The same issue raised by @florinserbu2 also happening to me.
$category->dataHasChangedFor('url_key')
$category->dataHasChangedFor('is_anchor')
$category->getIsChangedProductList()
all three methods are returning true though I just opened the page and saved it.
url_rewrite table?@MagePsycho
I truncate url_rewrite table and perform reindexing via shell using
php bin/magento indexer:reindex
then after indexer, removed some temp folder
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf var/generation/*
After all above operation, both issues fixed for me. Hope it'll help you as well. Keep backup of table "url_rewrite" before truncate.
@pankajpragma Are you sure url_rewrite tables are populated later when full re-indexing is run?
Also there is no specific indexer for Url Rewrite in Magento2.
Can anyone confirm it's a Magento 2 codebase bug or bug in Data Migration Tool?
@MagePsycho
Yes, In my case it was generated automatically for products after reindexing, but for categories, I need to save each category manually to generate its URL.
It's an issue with data migration tool. I don't see any problem with Magento code base.
@pankajpragma
We can use script to generate url for Categories. I will send you the script to generate category URL, can you post your email id here
@nagamani-sigma
Thank you, please send here pankaj.[email protected]
@pankajpragma
Sent. Please check
@nagamani-sigma
Received, Thank you so much.
@pankajpragma
I want the script to generate category URL, could you please send me [email protected].
Thanks
@nagamani-sigma Hi, is there a script for re-generating all product URLs? I have uploaded new product URLs through a CSV file. They show on the admin panel however products cannot be accessed with the new URLs.
When I click save on each product, then the new URL starts working. However, I have 300000 products so is there a script that will go through all products and save them to regenerate the URLs.
I tried re-indexing but that didnt work either.
@nagamani-sigma is there a way of getting your script without posting my email address in the raw?
cheers
Chris
Hi @ozgeekmum ,
I have attached the script, upload it in your site root and run.
scripts.zip
I am still getting this error for the categories that I have a lot of products. I have tried running the script, truncating the url rewrite table, reindexing and clearing cache and nothing is getting it to work.
Is there another solution or something in the .ini that needs to be adjusted?
Magento 2.1.6
I am still have this issue too, I can not do any change in a category that have approximately 20.000 products.
Magento 2.1.7
Still having this issue.
Magento 2.0.11 upgraded to Magento 2.1.7 - issue still exists.
Did some once found any fix for this, I facing same problem while saving the category having about 10k products.
@MagePsycho @qsolutions-pl @florinserbu2 what you solution for this ?
Same problem here in 2.1.7. Clean installation and no migration from Magento 1. The issue only appear when we're trying to save categories with thousands of products (same as everyone else above). Status?
Same here. Migrated from Magento 1.9 to Magento 2.1.7. I can setup new categories and add products but the categories containing products which come from my old M1.9 install can't be removed.....Looove to see a solid fix for this!!
I have the idea it has something to do with URL_rewrite but even after truncate this table there was no difference, any ideas?
I have also same problem "Something went wrong while saving the category".
please let me know if any have solution for this. i have tried lot. but no success.
Migrated from 2.0.7 to 2.1.0 and receive this error on specific existing product categories when trying to save changes.
edit: increased my server's max execution time and memory limit (1GB) and the save actually went through.. but this doesn't seem normal, may have something to do with this issue #7874
@adityag186, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9
Hello. We have the same issue and would be happy to know if someone have succed to find a solution ?