pluginpal / strapi-webtools

🔗 Unique, flexible and autogenerated URLs for your Strapi managed web content.
https://www.pluginpal.io/plugin/webtools
MIT License
30 stars 14 forks source link

[BUG] URL pattern screen is not being loaded #150

Closed SalahAdDin closed 1 month ago

SalahAdDin commented 3 months ago

Bug report

Describe the bug

After setting up both the the sitemap plugins with the core, we want to generate the URL patterns, we go to the screen, and it does not load.

Steps to reproduce the behavior

  1. Go to Admin Panel
  2. Click on Webtools
  3. Click on URL Patterns
  4. See error

Expected behavior

We should see the screen available so we can edit the URL patterns.

Screenshots

image

Code snippets

If applicable, add code samples to help explain your problem.

System

Additional context

I was using an old version of Sitemaps and I defined the URLs also; as there is no migration guide, I didn't migrate anything.

SalahAdDin commented 2 months ago

@boazpoolman

From my investigation, I get that fetching the URL patterns always returns an empty array: image

It is a problem since the index requires to get not an empty array of patterns:

if (loading || !patterns.length) {
    return (
      <Center>
        <Loader>{formatMessage({ id: 'webtools.settings.loading', defaultMessage: 'Loading content...' })}</Loader>
      </Center>
    );
  }

Is it intended to be like that? Is there any extra step to add URL patterns?

From the documentation we get that screen is where we define the patterns!

MSACC commented 1 month ago

Hello @SalahAdDin , thanks for sending in the bug report. We want to create robust Strapi plug-ins and thus want to help you (and maybe others) with this experience.

Could you provide us with some more information? What are the contents of your wt_url_patterns table in the database? Maybe it is empty or missing a value?

Thanks for letting us know!

Mathijs

TMSchipper commented 1 month ago

Hi @SalahAdDin, I have tried to reproduce this issue and I can confirm that this is a problem. I'll update the label and we'll take a look at it soon. Hopefully I have informed you sufficiently, if you have any questions you can always contact us.

Kind regards, PluginPal.

boazpoolman commented 1 month ago

This issue has been fixed and released with v1.0.0-beta.12