strapi-community / strapi-plugin-publisher

A plugin for Strapi Headless CMS that provides the ability provides the ability to easily schedule publishing and unpublishing of any content type.
https://market.strapi.io/plugins/strapi-plugin-publisher
MIT License
48 stars 17 forks source link

Issues in different strapi versions #104

Closed TasosBak closed 1 year ago

TasosBak commented 1 year ago

Hello and congrats on the plugin!

I am having some weird issues.

Strapi version: 4.9.2

publisher-plugin: 1.4.0

In version 4.9.2 it doesn't work at all. I get this when I navigate inside an instance of a collection type. image

TypeError: (0 , utils_namespaceObject.createYupSchema) is not a function
    at Action (main.a0799631.js:43429:55)
    at Ch (main.a0799631.js:88604:137)
    at ck (main.a0799631.js:88714:460)
    at bk (main.a0799631.js:88697:347)
    at ak (main.a0799631.js:88697:278)
    at Tj (main.a0799631.js:88697:138)
    at Lj (main.a0799631.js:88690:163)
    at main.a0799631.js:88570:115
    at exports.unstable_runWithPriority (main.a0799631.js:100203:343)
    at gg (main.a0799631.js:88569:325)

Strapi version: 4.11.0

publisher-plugin: 1.4.0

In version 4.11.0 I was able to navigate inside an instance of a collection type, but when I do chrome eats up all of the processing power of the machine and in the console I get the following error, tens of times per second.

17168 Deprecation warning: Usage of "size" prop in Stack component is deprecated. This is discouraged and will be removed in the next major release. Please use "spacing" instead

Strapi version: 4.13.2

publisher-plugin: 1.4.0

In version 4.13.2 I was able to navigate inside an instance of a collection type but the timepicker is so slow it renders the feature unsusable.

Does anybody have any suggestions? I would prefer staying in 4.9.2 for the time being but I will consider updating to newer version if nothing can be done for 4.9.2.

ComfortablyCoding commented 1 year ago

Hello thanks for the details report!

Unfortunately due to the way strapi makes changes between minor versions I can't easily provide backward compatibility between them.

Therefore as stated in the readme only the latest version is supported.

I noticed the performance issue in the latest version as well, I assume it's due to some change that strapi has made on their side. I will see if I can determine the cause.

P.S.

TasosBak commented 1 year ago

I will look into it as well then!

I haven't tried it with a bigger components.dateTimePicker.step so that the select element has less values, it may increase performance.

ComfortablyCoding commented 1 year ago

Please check out https://github.com/ComfortablyCoding/strapi-plugin-publisher/pull/105 and let me know if this resolves the performance issue.

It removed the deprecated size attribute which seems to have fixed this performance issue. I assume it was re-rendering the component each time a deprecation was detected resulting in an infinite loop and degraded performance.

TasosBak commented 1 year ago

Yes I don't get the warnings and it doesn't spike cpu!

It still seems like it is lagging though if you don't change the step in the config, even a step 5 improves it a lot! I think it's normal because there are a lot of values if you leave the default step which is 1.

      components: {
        dateTimePicker: {
          step: 5
        }
      }
ComfortablyCoding commented 1 year ago

Yes, I have observed the same behaviour. I think this is acceptable for now.

ComfortablyCoding commented 1 year ago

Released in v1.4.1

ComfortablyCoding commented 1 year ago

The degradation due to many values is possibly related to https://github.com/strapi/design-system/issues/1170