mirasvit / module-blog

Magento 2 Blog Extension
https://mirasvit.com/magento-2-extensions/blog.html
Open Software License 3.0
68 stars 48 forks source link

Root category can be deleted and destroys complete category management #72

Closed andidhouse closed 7 years ago

andidhouse commented 7 years ago

It is possible to delete the "root" blog category with the ID1 (we did that).

We created a new root category which has now the ID2 and the complete category structure is not working and showing in the frontend.

I think the extension is programmed that the Root category has the ID1 - once this is deleted it does not work anymore.

How do we fix this again and it would be great if it would be not possible to delete the "root" category any more as you can not recreate this category with the ID1.

andidhouse commented 7 years ago

root category

andidhouse commented 7 years ago

The first picture shows the "root" category which has now the ID2 - we deleted the original root category with the ID1.

Now no category can be assigned to a parent category (screen2).

How can we fix this in the database?

Thanks!

RomanZh commented 7 years ago

Hi,

You can create root category in any time you want. But after that you should create new root category. To create root category just create category without parent. As root category was changed you should reassign all subcategories to new root category.

Regards

andidhouse commented 7 years ago

Hi Roman,

you are right. If we recreate the root category it is possible to resign the other categories. BUT:

I think there is still a problem when deleting the default root category.

andidhouse commented 7 years ago

base I think this is a problem of the new root category created as this root (in our example called "base" now has a url field (which makes no sense) and also has a parent category select which is normally a required field but also now works without choosing this.

I think the root should not have a:

  1. url
  2. a parent category field

And this is i think where the problems come from if you recreate a new root after deleting the original.

Is there any simple way to reinstall the extension so it is working?

andidhouse commented 7 years ago

base-1

andidhouse commented 7 years ago

IN comparison to our "new root" category your demo root category shown no "parent category option":

bildschirmfoto 2017-07-17 um 15 07 25

andidhouse commented 7 years ago

We tested this now on three different shops - all get the same problem when deleting the default root category.

@RomanZh could you pls check this - we really need it to go live. Many thanks!

RomanZh commented 7 years ago

@andidhouse we will check it and notify about results on this week

andidhouse commented 7 years ago

Thanks great!

RomanZh commented 7 years ago

We have fixed the issue and released module 'blog' version 1.0.19-beta. Please, update the module.

andidhouse commented 7 years ago

Hi Roman,

the "beta" can not be updated by the normal "composer update" string right?

What is here to set to just update the blog in beta mode and not load other composer packages in "beta" mode as well?

Thanks!

RomanZh commented 7 years ago

You can use this command

composer require mirasvit/module-blog:1.0.19-beta