I'm facing an issue while trying to create a category in Magento 2.4.7-p2 The following error appears when i click categories from Catalog from the Magento 2 Admin
1 exception(s): Exception #0 (ReflectionException): Class "Magento\Catalog\Model\Category\Attribute\Backend\DefaultSortby" does not exist
Despite trying these steps, the issue persists. Has anyone encountered a similar issue or knows what might be causing this? Any help or guidance would be greatly appreciated!
Hello @mahade hassan_khan,
1. Disable all third party module once.
2. run all commands and check.
3. if issue still persists, then check any attribute using that class in database.
4. Check eav_attribute table backend class in database.
Let me know if you find anything in database table.
I hope it helps!
It looks like you're missing the DefaultSortby class in Magento 2.4.7-p2. Here’s what you can try:
Same error i found.
Check than in `eav_attribute` table `default_sort_by` attribute `backend_mode` save wrong value need to change that with "Magento\Catalog\Model\Category\Attribute\Backend\Sortby" which is working now.
Because no such file as DefaultSortby.php